[gobolinux-users] swap file expand/shrink on demand

teique teique at gmail.com
Thu Feb 7 18:33:45 NZDT 2008


--

Cansou de perder tempo? Leia Jiddu Krishnamurti, www.jkrishnamurti.org, www.krishnamurti.org.br


Hisham Muhammad wrote:
> On 12/19/05, teike <teikecorp at gmail.com> wrote:
>   
>> I have researched a bit and didnt find n either.
>> I will try (not sure about system stability) to write a script to auto
>> create and activate/delete 50MB swap files on demand, if someone knows
>> about a similar application I would like to hear, thx :).
>>     
>
> On a somewhat offtopic but tangently related note, most NT people I
> know say this "variable size swap" that Windows has is a very bad idea
> and one of the first 'performance tweaks' they make in an NT box is to
> set minimum and maximum swap size to the same value (ie, make swap
> fixed-size). Your mileage may vary, of course -- this is just hearsay.
>
> Linux uses swap even when memory is not full, to optimize usage of
> RAM, but the time when you _need_ swap is already a critical situation
> for the machine, you don't want it overloaded with another concern
> (increasing swap). I suggest you to take a look at your typical swap
> usage, 
I got 1GB of ram
and I had more 2GB of swap files just to prevent problems,
sometimes when I run "Regnum Online", it may require that much of swap 
space,
and if that swap isnt present, machine freezes (keeps reading HD crazly 
till I boot it up)

also if I use 7z-zip at ultra etc etc (7zFM.exe with wine) it may 
require 1.3GB of ram!

so... xD
I created a SwapFileOnDemand.sh bash script ^^,
and it worked so well (I removed the 2GB files!) that I deployed as a 
sub-project at:
https://sourceforge.net/projects/scriptechocolor/
for anyone who find it to be interesting also ^^

btw, I found out that swapoff on a file that is being used (as long you 
still have enough free swap space on other swap files), doesnt hurt the 
system (kernel 2.6.20 at least...)!
> chances are you don't actually need that much swap anyway.
>
> -- Hisham
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
>
>   



More information about the gobolinux-users mailing list