Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Apr 13, 2010 12:45 pm 
Offline
Senior Newbie

Joined: Wed Nov 18, 2009 3:35 am
Posts: 7
Image

This graph was created by munin. My linode is a 360. Is it normal how committed is way up there? If not, how can I diagnose the problem?

I have noticed that if I restart apache, the commited drops down to 1G, then climbs back up after a few minutes.


Top
   
 Post subject:
PostPosted: Tue Apr 13, 2010 5:44 pm 
Offline
Junior Member

Joined: Wed Sep 03, 2008 9:51 am
Posts: 25
The Linux kernel overcommits it's memory. There's a lot of info out there about it, but here's some good links that explain it:

http://utcc.utoronto.ca/~cks/space/blog ... Overcommit
http://utcc.utoronto.ca/~cks/space/blog ... Overcommit
http://utcc.utoronto.ca/~cks/space/blog ... mitDefault

What that graph is telling you, is that if each process were to actually use what it says it needs, you'd be fubar :)

Take a look at your mysql setup too if you're running it on this server. Running <a href="http://blog.mysqltuner.com/">mysqltuner</a> will help you get that where it should be.

Hope that gets you started.

Justin


Top
   
 Post subject:
PostPosted: Wed Apr 14, 2010 3:34 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
My vote goes for stack size.
In Linux, default stack size per-thread is 8MB. So, if you use, for example, apache-worker with many threads, or apache prefork with a bunch of subprocesses, the commit graph skyrockets.

I personally am running a 4x25-thread worker, and "ThreadStackSize 20972152" "freed"* me 600 MB of commit.
MySQL with InnoDB likes large overcommit too.

I think you can play with "ulimit -s" to cut down the stack size for apps that don't support configuring it explicitly, but keep in mind it may lead to badly-written apps crashing with out of memory errors.

*The memory wasn't actually ever allocated, it's just a flag somewhere in the kernel data structures.


Top
   
 Post subject:
PostPosted: Thu Apr 15, 2010 4:31 am 
Offline
Senior Newbie

Joined: Wed Nov 18, 2009 3:35 am
Posts: 7
rsk wrote:
My vote goes for stack size.
In Linux, default stack size per-thread is 8MB. So, if you use, for example, apache-worker with many threads, or apache prefork with a bunch of subprocesses, the commit graph skyrockets.

I personally am running a 4x25-thread worker, and "ThreadStackSize 20972152" "freed"* me 600 MB of commit.
MySQL with InnoDB likes large overcommit too.

I think you can play with "ulimit -s" to cut down the stack size for apps that don't support configuring it explicitly, but keep in mind it may lead to badly-written apps crashing with out of memory errors.

*The memory wasn't actually ever allocated, it's just a flag somewhere in the kernel data structures.


I'm also running a apache instance with the worker MPM. Where exactly did you put that ThreadStackSize directive? In the apache2.conf under the "<IfModule mpm_worker_module>" section?


Top
   
 Post subject:
PostPosted: Thu Apr 15, 2010 11:25 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Yes, inside that section.
Also, this.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group