WebFaction
Community site: login faq

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
547
accept rate: 0%


Our memory monitors and the limit is based on RSS (Resident Set Size) memory, as reported by ps.

ps -u $USER -o rss,command
permanent link

answered 05 Jul '13, 20:29

johns
5.4k312
accept rate: 23%

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108
×87
×25

question asked: 05 Jul '13, 20:11

question was seen: 2,067 times

last updated: 06 Jul '13, 00:28

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM