[ale] Kernel 2.6 : worst-case scenarios if swap full
Brian Pitts
brian at polibyte.com
Sat Jun 28 12:57:27 EDT 2008
Jim Popovitch wrote:
> On Fri, Jun 27, 2008 at 6:01 PM, Jerry Yu <jjj863 at gmail.com> wrote:
>> On a db server with 16G ram and 1G swap
>
> That seems (IMHO) to be a small amount of swap. Granted this is an
> old-school opinion, but I've always set swap to real-mem * 2. Now I
> don't think that you will need 38G of swap :-) but it I would go with
> at least 2G, if not 4G. Jim Kinney may be correct that nothing over
> 2G will be utilized, but you can quickly find that out with "swapon
> -s".
Linux prefers to swap processes memory rather than free cache. I doubt
this is what you want on a database server if it's using InnoDB tables
or something similar where the database caches the rows itself. I'd set
swappiness to something low like 10 and have a small swap file. I
wouldn't necessarily follow this posts advise, but there's some good
discussion in the comments at
http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/
-Brian
More information about the Ale
mailing list