If I use smart spawning option with Passenger, there is a significant difference in memory use reported by passenger-memory-stats and typical memory measurement methods like http://community.webfaction.com/questions/8553/how-to-determine-memory-consumption . I understand that this is because Passenger in smart mode shares memory between processes and this sharing isn't considered by 'ps' so it is reporting much higher than actual memory use. Do WebFaction's monitoring tools account for this or will I end up with shutdown processes due to excessive memory use? asked 05 Jul '13, 20:11 Bc25 |
Our memory monitors and the limit is based on RSS (Resident Set Size) memory, as reported by ps.
answered 05 Jul '13, 20:29 johns OK thanks. Is there any prospect for this to change? At least with Rails on Passenger, this way of counting is worse for everyone. For example, I can run 3 instances in about 200MB in smart mode. Plus, I can keep the min at 1 since new instances are launched near instantly in smart mode. So most of the time I am using about 100MB. But RSS will count 200-450MB for 1-3 instances (AppSpawner + instances). To avoid this I'd need to run 2 instances in direct mode continuously, using about 200MB. Spinning up new instances takes a few seconds in direct mode. So I get 1 less instance at peak while the server actually has 100MB less memory most of the time and about the same at peak. I understand it probably isn't easy to update monitoring tools...just something to keep in mind.
(05 Jul '13, 22:34)
Bc25
We can't easily change how we monitor memory without other ramifications, so I would not expect this behavior to change. You may want to debug your applications and see why each thread is loading that much data into memory and possibly reduce it by altering your code or upgrading the RAM on the account to account for your application's usage.
(06 Jul '13, 00:28)
johns
|