Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Volker Armin Hemmann
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.



Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Dale
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

:-)  :-) 



Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Grant
 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



Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Dale
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

:-)  :-) 



Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Mick
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


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?

2009-05-30 Thread Nikos Chantziaras

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.)