[CentOS] what would be happen if swap partition is not?

Gordon Messmer yinyang at eburg.com
Mon Jul 6 14:54:15 UTC 2009


On 07/03/2009 05:46 AM, MontyRee wrote:
>
> But, if there is no swap partion at system, what would be happen?
> that makes the system unstable or not?

That depends on what you're running.  As people point out, you can 
usually get along without one, but doing so is a bad idea in some 
configurations.  If you run a server that's dedicated to any single 
large application (like dedicated tomcat or database server), then you 
should have swap at least as large as RAM.  Even when you configure the 
system so that applications stay within the bounds of RAM, fork() will 
fail in your application if it doesn't have room for a complete second 
copy of itself in memory.  The space won't normally be used, since Linux 
uses a copy-on-write technique for fork(), but it still requires the 
space before it will allow fork() to succeed.



More information about the CentOS mailing list