--Apple-Mail-21--145341007
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

On 18 Mar 2005, at 22:00, Doug Beaver wrote:

> On Sat, Mar 19, 2005 at 07:29:38AM +0900, Eric Hodel wrote:
>>
>> 43 Things averages 46661 KB/Rails process (we peak at 200,000
>> pageviews/day running 40 processes FastCGI across 2 servers).  Most of
>> the time load hovers around 0.10 to 0.20 (we have dual 3GHz Xeons with
>> 2GB RAM), but peaks at about 0.50.
>
> i'm surprised you're using so much memory.  is the 46MB number just
> rss, or rss+shared?  i would expect your rss-per-process to be 1-10MB,
> with >10MB being indicative of leaks, unless you're doing lots of
> per-process caching, which doesn't make a lot of sense from a locality
> perspective anyways.

Since a running Ruby process doesn't fork() to spawn new children 
(FastCGI forks and execs) any sharing would need to be figured out by 
the OS.  I don't worry about that because we aren't near the amount of 
load that makes it necessary to worry about.  (By the time I need to 
think about it, somebody will probably have figured it out for us.)

At startup the processes are under 20MB, and grow to around 45MB after 
a day.  In development mode we can tickle something that causes 
processes to grow to 150+ MB  (I think this is a problem in our code, 
as it only happens when working on a particular part of the site, so I 
doubt this is a Rails problem.  At worst, it might be a side effect of 
the way reloading works in Ruby.)

We do cache lots of stuff in-process, but we haven't investigated our 
code for potential leaks yet because we've restarted the processes 
before they've lived for more than two days.

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

--Apple-Mail-21--145341007
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCPS51MypVHHlsnwQRAkKAAKCVfrNiIs/WRwxztPlgvQYcTP7eFwCdEozI
Gt5HqUMyKCmg7kyQ1PD3SqU=
=Og5K
-----END PGP SIGNATURE-----

--Apple-Mail-21--145341007--