On Wed, Jun 23, 2010 at 1:56 PM, Marshal Linfoot <[email protected]> wrote:
> The http sever is litespeed.

what is behind there? fastcgi, mongrel, thin, unicorn etc.

> Database is mysql.

are you using the default mysql configuration? if i recall (it's been
a while since i used mysql) the default config isn't really optimized
for speed.

<http://www.mysqlperformanceblog.com/2006/09/29/what-to-tune-in-mysql-server-after-installation/>
may be a useful read.

> Under these circumstances, I'm seeing these kinds of numbers in the
> production.log when accessing pages on the site:
>   Completed in 1445ms (DB: 127) ...
>   Completed in 1838ms (DB: 317) ...
>   Completed in 4037ms (DB: 998) ...
>   Completed in 4865ms (DB: 488) ...

yikes. are you accidentally running in development mode?

> These are "good" numbers; sometimes the total completed is in the
> 20000-40000ms range! I don't understand where the bottleneck is. The db
> times are consistently less than 1000ms and usually under 500ms.

1000ms to 500ms db responses sound way slow to me. i just looked at
one of the production servers (running ubuntu 9.10) i have access to
and db responses were all under 100ms using sqlite.

> What's worse though is over time, no idea why, the ruby processes will start
> to runaway and I'll end up with 8-10 of them each vying for 20-30% of
> memory. Machine load avg spikes up to 14 and the system is essentially
> unusable and needs a reboot.

sounds like fcgi. i just had a look at a different production server
that runs 10 thins and it has been up for 135 days with stable memory
usage over that time; no steady increase.

> I'm considering bumping the slice memory up to 512MB, but am concerned that
> all it will do is delay the inevitable runaway ruby processes.

i think you have other issues to track down but as a solution in the
meantime that may be the way to go.

Reply via email to