* [gentoo-user] Disabling swap & mounting /tmp on tmpfs = new standard?
@ 2009-05-30 17:38 Grant
2009-05-30 18:08 ` [gentoo-user] " Nikos Chantziaras
0 siblings, 1 reply; 7+ messages in thread
From: Grant @ 2009-05-30 17:38 UTC (permalink / raw
To: Gentoo mailing list
I recently disabled swap and mounted /tmp on tmpfs for a netbook since
the SSD is so slow, and now I'm wondering if that would be a wise move
for all of my Gentoo systems. In what type of situation would it be a
bad idea?
- Grant
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-30 17:38 [gentoo-user] Disabling swap & mounting /tmp on tmpfs = new standard? Grant
@ 2009-05-30 18:08 ` Nikos Chantziaras
2009-05-30 23:15 ` Mick
0 siblings, 1 reply; 7+ messages in thread
From: Nikos Chantziaras @ 2009-05-30 18:08 UTC (permalink / raw
To: gentoo-user
Grant wrote:
> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
> the SSD is so slow, and now I'm wondering if that would be a wise move
> for all of my Gentoo systems. In what type of situation would it be a
> bad idea?
Instead of disabling swap, just make it small (like 32MB or something;
whatever the smallest allowable partition size is). The kernel needs
swap to operate optimally, even if it's extremely small. Just make sure
it's there.
Mounting /tmp as tmpfs improves speed, so no problems there. You might
want to mount /var/tmp/portage as tmpfs too, that will give nice speed
gains during emerge (if you have the RAM for it; a 2GB /var/tmp/portage
should be enough for almost anything except OpenOffice, you'll have to
umount to emerge that one.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-30 18:08 ` [gentoo-user] " Nikos Chantziaras
@ 2009-05-30 23:15 ` Mick
2009-05-30 23:46 ` Dale
0 siblings, 1 reply; 7+ messages in thread
From: Mick @ 2009-05-30 23:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
On Saturday 30 May 2009, Nikos Chantziaras wrote:
> Grant wrote:
> > I recently disabled swap and mounted /tmp on tmpfs for a netbook since
> > the SSD is so slow, and now I'm wondering if that would be a wise move
> > for all of my Gentoo systems. In what type of situation would it be a
> > bad idea?
>
> Instead of disabling swap, just make it small (like 32MB or something;
> whatever the smallest allowable partition size is). The kernel needs
> swap to operate optimally, even if it's extremely small. Just make sure
> it's there.
Hmm, on this old box I noticed swap was using more than 135,000K earlier today
as I was emerging xulrunner and ImageMagick. I think that the size of swap
is relevant to the memory size that the box in question has. Not all
machines have found their way to 2G RAM yet ... ;)
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-30 23:15 ` Mick
@ 2009-05-30 23:46 ` Dale
2009-05-31 0:46 ` Grant
0 siblings, 1 reply; 7+ messages in thread
From: Dale @ 2009-05-30 23:46 UTC (permalink / raw
To: gentoo-user
Mick wrote:
> On Saturday 30 May 2009, Nikos Chantziaras wrote:
>
>> Grant wrote:
>>
>>> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
>>> the SSD is so slow, and now I'm wondering if that would be a wise move
>>> for all of my Gentoo systems. In what type of situation would it be a
>>> bad idea?
>>>
>> Instead of disabling swap, just make it small (like 32MB or something;
>> whatever the smallest allowable partition size is). The kernel needs
>> swap to operate optimally, even if it's extremely small. Just make sure
>> it's there.
>>
>
> Hmm, on this old box I noticed swap was using more than 135,000K earlier today
> as I was emerging xulrunner and ImageMagick. I think that the size of swap
> is relevant to the memory size that the box in question has. Not all
> machines have found their way to 2G RAM yet ... ;)
>
>
Don't forget that you can set swapiness too. This is set in
/etc/sysctl.conf and for mine I have this:
vm.swappiness = 30
The lower the number, the less chance of it using swap. If it is set to
90, it will use a lot of swap which is fine if you have little ram or a
really fast drive. If it is set to 30, then it will not use swap unless
it is basically out of ram.
With the setting of 30, mine uses swap when compiling OOo or some other
large package or if I am opening a TON of pics. Otherwise, swap is at 0
or close to it even after being up a long time. I have 2Gbs here tho.
Your mileage may vary.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-30 23:46 ` Dale
@ 2009-05-31 0:46 ` Grant
2009-05-31 1:24 ` Dale
2009-05-31 4:26 ` Volker Armin Hemmann
0 siblings, 2 replies; 7+ messages in thread
From: Grant @ 2009-05-31 0:46 UTC (permalink / raw
To: gentoo-user
>>>> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
>>>> the SSD is so slow, and now I'm wondering if that would be a wise move
>>>> for all of my Gentoo systems. In what type of situation would it be a
>>>> bad idea?
>>>>
>>> Instead of disabling swap, just make it small (like 32MB or something;
>>> whatever the smallest allowable partition size is). The kernel needs
>>> swap to operate optimally, even if it's extremely small. Just make sure
>>> it's there.
>>>
>>
>> Hmm, on this old box I noticed swap was using more than 135,000K earlier today
>> as I was emerging xulrunner and ImageMagick. I think that the size of swap
>> is relevant to the memory size that the box in question has. Not all
>> machines have found their way to 2G RAM yet ... ;)
>>
>>
>
> Don't forget that you can set swapiness too. This is set in
> /etc/sysctl.conf and for mine I have this:
>
> vm.swappiness = 30
>
> The lower the number, the less chance of it using swap. If it is set to
> 90, it will use a lot of swap which is fine if you have little ram or a
> really fast drive. If it is set to 30, then it will not use swap unless
> it is basically out of ram.
>
> With the setting of 30, mine uses swap when compiling OOo or some other
> large package or if I am opening a TON of pics. Otherwise, swap is at 0
> or close to it even after being up a long time. I have 2Gbs here tho.
> Your mileage may vary.
>
> Dale
Thanks Dale. Should "vm.swappiness = 30" work well on all systems?
My Gentoo systems have vastly different specs and duties so I love
tweaks that always improve things. It sounds like /tmp on tmpfs is
one of those.
- Grant
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-31 0:46 ` Grant
@ 2009-05-31 1:24 ` Dale
2009-05-31 4:26 ` Volker Armin Hemmann
1 sibling, 0 replies; 7+ messages in thread
From: Dale @ 2009-05-31 1:24 UTC (permalink / raw
To: gentoo-user
Grant wrote:
>>>>> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
>>>>> the SSD is so slow, and now I'm wondering if that would be a wise move
>>>>> for all of my Gentoo systems. In what type of situation would it be a
>>>>> bad idea?
>>>>>
>>>>>
>>>> Instead of disabling swap, just make it small (like 32MB or something;
>>>> whatever the smallest allowable partition size is). The kernel needs
>>>> swap to operate optimally, even if it's extremely small. Just make sure
>>>> it's there.
>>>>
>>>>
>>> Hmm, on this old box I noticed swap was using more than 135,000K earlier today
>>> as I was emerging xulrunner and ImageMagick. I think that the size of swap
>>> is relevant to the memory size that the box in question has. Not all
>>> machines have found their way to 2G RAM yet ... ;)
>>>
>>>
>>>
>> Don't forget that you can set swapiness too. This is set in
>> /etc/sysctl.conf and for mine I have this:
>>
>> vm.swappiness = 30
>>
>> The lower the number, the less chance of it using swap. If it is set to
>> 90, it will use a lot of swap which is fine if you have little ram or a
>> really fast drive. If it is set to 30, then it will not use swap unless
>> it is basically out of ram.
>>
>> With the setting of 30, mine uses swap when compiling OOo or some other
>> large package or if I am opening a TON of pics. Otherwise, swap is at 0
>> or close to it even after being up a long time. I have 2Gbs here tho.
>> Your mileage may vary.
>>
>> Dale
>>
>
> Thanks Dale. Should "vm.swappiness = 30" work well on all systems?
> My Gentoo systems have vastly different specs and duties so I love
> tweaks that always improve things. It sounds like /tmp on tmpfs is
> one of those.
>
> - Grant
>
>
>
I'm on x86 and I really don't know where the vm part came from. It
could have been me that put it there but I think it may have gotten
updated somewhere along the way. I'm not sure what would update that
tho. May be worth a google for your arch and just swappiness and see
what else can be in front of it.
I used to have it set to 70 when I only had 512MBs of ram. It would use
swap pretty regular, even just for caching stuff. So, the setting does
work for sure. If you wanted it to use swap only to prevent the system
from crashing, I would assume you could set it to 10 or something like
that. If you have a really fast drive, SATA or something, then you
could set it to 90 and let it use swap all it wants.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
2009-05-31 0:46 ` Grant
2009-05-31 1:24 ` Dale
@ 2009-05-31 4:26 ` Volker Armin Hemmann
1 sibling, 0 replies; 7+ messages in thread
From: Volker Armin Hemmann @ 2009-05-31 4:26 UTC (permalink / raw
To: gentoo-user
On Sonntag 31 Mai 2009, Grant wrote:
> >>>> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
> >>>> the SSD is so slow, and now I'm wondering if that would be a wise move
> >>>> for all of my Gentoo systems. In what type of situation would it be a
> >>>> bad idea?
> >>>
> >>> Instead of disabling swap, just make it small (like 32MB or something;
> >>> whatever the smallest allowable partition size is). The kernel needs
> >>> swap to operate optimally, even if it's extremely small. Just make
> >>> sure it's there.
> >>
> >> Hmm, on this old box I noticed swap was using more than 135,000K earlier
> >> today as I was emerging xulrunner and ImageMagick. I think that the
> >> size of swap is relevant to the memory size that the box in question
> >> has. Not all machines have found their way to 2G RAM yet ... ;)
> >
> > Don't forget that you can set swapiness too. This is set in
> > /etc/sysctl.conf and for mine I have this:
> >
> > vm.swappiness = 30
> >
> > The lower the number, the less chance of it using swap. If it is set to
> > 90, it will use a lot of swap which is fine if you have little ram or a
> > really fast drive. If it is set to 30, then it will not use swap unless
> > it is basically out of ram.
> >
> > With the setting of 30, mine uses swap when compiling OOo or some other
> > large package or if I am opening a TON of pics. Otherwise, swap is at 0
> > or close to it even after being up a long time. I have 2Gbs here tho.
> > Your mileage may vary.
> >
> > Dale
>
> Thanks Dale. Should "vm.swappiness = 30" work well on all systems?
> My Gentoo systems have vastly different specs and duties so I love
> tweaks that always improve things. It sounds like /tmp on tmpfs is
> one of those.
>
> - Grant
you can set swappiness = 0 which works even better, because the kernel will
only swap if it really has too.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-05-31 4:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-30 17:38 [gentoo-user] Disabling swap & mounting /tmp on tmpfs = new standard? Grant
2009-05-30 18:08 ` [gentoo-user] " Nikos Chantziaras
2009-05-30 23:15 ` Mick
2009-05-30 23:46 ` Dale
2009-05-31 0:46 ` Grant
2009-05-31 1:24 ` Dale
2009-05-31 4:26 ` Volker Armin Hemmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox