2 Months ago, I installed Ubuntu 12.04 in my PC. I never knew what was swap memory and I gave 1.5 GB for Swap Partition but I read in an Article for a PC with 2GB ram and 100GB+ Hard disk, We should allocate 2GB for swap. Now I realize why PC crashes often. How can i increase my swap memory now?
1 Answer
Does it really crash because of swap space? Did you see the memory usage go up and see it crash? I mean, it could crash for a lot of reasons.
You can either increase the swap partition size with a tool like gparted, probably only from a live cd though. Or you can create a swap file.
-
Note that you can have multiple swap partitions/files so you don't have to increase the existing partition, but I'd also be surprised if a system with 2Gb was crashing due to swap. I have 2 systems with 2Gb and neither uses much swap space, but if you had a memory hungry application, it might need swap space and become very sluggish with lots of disk activity before hanging (becoming unresponsive); is this what you are calling a crash? Of course, the alternative is you have a disk error in the swap area and this is causing the crash, in which case more swap won't help. Jul 26, 2012 at 12:03
/var/log/kern.log
that correspond to these crashes?