commited memory large, normal?

![](" /> ~~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.~~

4 Replies

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/unix/MemoryOvercommit

http://utcc.utoronto.ca/~cks/space/blog … Overcommit">http://utcc.utoronto.ca/~cks/space/blog/linux/LinuxVMOvercommit

http://utcc.utoronto.ca/~cks/space/blog … mitDefault">http://utcc.utoronto.ca/~cks/space/blog/linux/NonStrictOvercommitDefault

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 [http://blog.mysqltuner.com/">mysqltuner> will help you get that where it should be.

Hope that gets you started.

Justin](

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.

@rsk:

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 "" section?

Yes, inside that section.

Also, this.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct