On Sat, 2010-07-17 at 20:57 +0600, Junayeed Ahnaf Nirjhor wrote:
Hello,
Recently installed opensuse but made a mistake while installation. I've installed without any swap partition. So the system is sluggish. Went to google and found out this command will create a 512 MB file and use it as a swap:
dd if=/dev/zero of=/swapfile bs=1k count=524288 && mkswap /swapfile && sync && swapon /swapfile
Question is, As My ram is 2 GB I need a swap partition of at least 4 GB (It is stated on that site). What'll be the necessary changes to turn that 512 MB into 4GB file?
In the very early days of SUNos, when Linus was still a schoolboy, the people from sun-microsystems advised to use a swap area about twice the amount of mem. (atleast, that was in my trainings stuff from then) On of the reasons was, that they used this area also after a crache, as an area to write the coredump into. Since those day one might state that some progress has been made in the area of computer development. So unless you still are using SUNos 2.x you might want to reconsider the amount of swap. Swap is something of a last resort, if you are overcommiting the system or you are running a program for a long time with a memory leak. Consider it something like the safety lane on the highway. (it should be there, but it size doesn't reflect the size of the road) Whatever the amount of mem in your system, if you define a swap area with 1GB or 2GB you should have enough. If your systems runs out of mem AND you don't have swap, the Out-Of-Memory feature will shoot down processes you would rather still have keep on running. With some swap, you will be able to shoot of the offender yourself. (and dash off to by some extra mem) I have some servers with 64GB of mem, you don't seriously think i would sacrefice 128GB of diskspace for swap ???? hw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org