Two methods disable swap partition ubuntu 11.10
Swap partition is used as a backup memory, if memory or RAM built computer is not sufficient to run the process. usually swap partition size is 2 x RAM. If a computer has a memory 128 MB swap partition was made into 256 MB. Ubuntu 11.10 by default using the Swap Partition as large as the existing memory if the memory more than 1GB |
|
|
Comments (18)
Why is that?
When some buggy program slowly uses all available memory, disabling swap will make the inevitable crash come sooner, which can be a good thing, but in such a case it's better not to allow that program to use more than a certain amount of memory (I can't remember the command for it right now, but I've done that long ago).
When you have installed on a USB flash drive, disabling swap may allow the drive to live a bit longer, but in that case you should have installed without a swap partition.
When swap isn't used it doesn't do any harm, and when it is used you normally want it to be used...
Do you think that's what he's referring to? If you installed with swap, it's stupid to disable it as opposed to installing without swap?
I'm not a kernel internals guy, so I don't know the cost of merely having swap enabled.
@dinotrac
It's a personal opinion, and of course, just like anything else, debatable.
But read and save the article. Nice info.
Thanks for the link. Does look like you're better off not having a swap partition/file if you don't need it.
That makes sense to me, and mirrors some experience from my ancient mainframe days -- back to a combination of extended RAM (once upon a time mainframes could not address more than 16mb) and improved paging algorithms.
Your good link led me to another very informative article here: Understanding swap files in Linux
@Dino,
Quoting:Does look like you're better off not having a swap partition/file if you don't need it.
It is a pretty nice day here in Southeast Michigan, I assume it is the same around Chicago, so why are you looking for an argument? :-)
1, How can one tell whether a swap space is NOT going to be needed before hand?
2. What are the costs of allocating swap space especially now with disk space so small and aggressive swapping can be minimized?
3. Is there a good Linux monitoring tool/utility that you know of and runs in the background to keep a history of system resources usage and develop a trend with recommendation? Am I asking for too much?
4. As noted in the article, servers and desktops need are different in usage. On desktops, with lots of memory, swap space might not needed, but on servers, it is a totally different case. I agree with Nikkels, swap must be enabled.
You can never be 100% certain, but you can decide how averse you are to the consequences of a rare OOM condition.
You can determine how likely an OOM condition is by analyzing your load, AND, if you're like me, you can check on your machine from time to time and shut things down that you don't need.
I want to checkout and determine where the bottle necks are. Does anyone know of a good tool that runs in the background to collect system resource usage into a data file?
Quoting:old standboys like sar, vmstat, iostat, etc
I was thinking of a tool more like System Monitor to select sensors and direct output to a log file instead.
Run it to create a baseline then change system parameters and run it again. Repeat for several times then evaluate. That would give an idea about system sensitivity to changes of various parameter and helps tune a system and/or suggest to increase specific resources.
@ Fettoosh Thanks for the link
Quoting:Where do you think the system goes when you hibernate it?
Bora Bora
BFM wrote:Where do you think the system goes when you hibernate it?S4 is "hiberation". S3 is suspend-to-RAM. My desktop has no swap, but it supports S3 via the power button (custom config).
Not really. When somebody smashes into your car, you can't push the big red button and make everything right again.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Sign up and post (it is free) or Log in and post
