Linux will normally swap out a few pages of rarely used memory so it's
a good idea to have some swap around. 2G seems excessive though.
Usually I prefer to have linux kill processes rather than excessively
swapping. I've worked on machines before that have swapped so badly
that it took minutes just to ssh to them. This is effectively a
failure scenario that can last for a lot longer than it takes to
restart/failover mysqld. For apache it means the clients will see
errors until the load balancer health check drops the server out of
rotation. The best solution in all cases is to keep an eye on swap
in/out and memory usage so neither the crash nor the excessive
swapping becomes a problem.

On Wed, Apr 14, 2010 at 3:06 AM, Glyn Astill <glynast...@yahoo.co.uk> wrote:
> --- On Wed, 14/4/10, Dan Nelson <dnel...@allantgroup.com> wrote:
>
>> Hammerman said:
>> > My organization has a dedicated MySQL server. The
>> system has 32Gb of
>> > memory, and is running CentOS 5.3.  The default
>> engine will be InnoDB.
>> > Does anyone know how much space should be dedicated to
>> swap?
>>
>> I say zero swap, or if for some reason you NEED swap (for
>> crashdumps maybe,
>> but I didn't think Linux supported that), no more than
>> 2GB.  With that much
>> RAM, you don't ever want to be in the state where the OS
>> decides to page out
>> 8GB of memory (for example) to swap.  We have a few
>> Oracle servers with
>> between 32 and 48 GB of memory and they all live just fine
>> without swap.
>>
>
> But surely better to have a server that is paging out and has slowed to a 
> crawl than one where the oom killer starts killing off your processes, with 
> no swap I'd be turning overcommit off.
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=eric.ber...@gmail.com
>
>



-- 
Eric Bergen
eric.ber...@gmail.com
http://www.ebergen.net

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to