>>>> I ran into an out of memory problem.  The first mention of it in the
>>>> kernel log is "mysqld invoked oom-killer".  I haven't run into this
>>>> before.  I do have a swap partition but I don't activate it based on
>>>> something I read previously that I later found out was wrong so I
>>>> suppose I should activate it.  Is fstab the way to do that?  I have a
>>>> commented line in there for swap.
...
>        Switching from prefork to threads and vice versa can be very
> difficult depending on which modules and libraries your site uses. It is not
> on the list of things you should try first. Or second. Maybe 37th.
>        I wouldn't expect adding swap to do much in this case. Your site gets
> hit hard, Mysql is a bit slow, Apache processes start stacking up, the
> system starts swapping, disk is really slow compared to RAM, and everything
> grinds to a complete halt possibly locking the machine up.
>
>        The easiest thing to try is to turn off keepalives so child processes
> aren't hanging around keeping connections up. Also lower the number of
> Apache children to 8 * number of processors or a minimum of 32. Test a bit.
> Turning off keep alive can cause problems for Flash based uploaders to your
> site and code that expect the connection to stay up. For most sites this
> shouldn't matter.
>
>        Next I'd look at tuning your Mysql config. If you've never touched
> my.cnf, by default it's set to use 64MB IIRC. You may need to raise this to
> get better performance. key_buffer and innodb_buffer_pool_size are the only
> two I'd modify without knowing more.

I use the default MyISAM tables and it looks like there are three
key_buffer definitions in my.cnf.  One under [mysqld] is 16M, one
under [isamchk] is 20M, and one under [myisamchk] is 20M.  All
defaults.  Should I increase them all to 64M?

- Grant

Reply via email to