Running Out of Memory on Linode 360

Hello Linode Community!

I'm virusfree and I'm new here. I'm also new to Linux!(3 weeks of it).

and, I got a huge problem.

I Installed LXAdmin on my Centos 5.2 32Bit Linode 380 and I'm having a problem with Apache and Memory.

I'm running a small wordpress site (seoulbox.com) and a couple of sites with static pages only.

I ran BIND, Apache, MySQL, and Courier IMAP on my linode.

according to LXadmin's status page, I'm running 353MB of my 360mb memory. my swap is running at 65MB of its 512MB.

I followed one of the instructions here to reduce the max clients to 35 but still no change with the memory.

According to awstats, On my 3rd Day of running the said website, I already had 35,000 hits and consumed 400MB bandwidth which I doubt if its true or crap.

so what shall I do? should I upgrade to a 540 or 720 linode? that costs a lot of money per month? (I'm still a college freshmen and I'm paying the fees with my allowance)

any advice?

Thanks!

:D

4 Replies

Linux memory management is a little different than you might expect. Here's a good analogy:

~~[http://chrisjohnston.org/2009/why-on-linux-am-i-seeing-so-much-ram-usage" target="_blank">](http://chrisjohnston.org/2009/why-on-li … -ram-usage">http://chrisjohnston.org/2009/why-on-linux-am-i-seeing-so-much-ram-usage](

If you paste the output of "free -m" we can take a look and see how much you're really using. Also, I might recommend dropping your swap down a bit… 256MB should be about all one should need. (Swap is verrrry slow.)

Other than switching from Apache to nginx or lighttpd, you could try a few quick things like:

1. /etc/php.ini – set memory_limit to something lower, like "16M" (note that if it's too low, Wordpress won't run)

2. Use MySQL settings for "small" systems, see the settings in /usr/share/mysql/my-small.cnf

3. Try turning off "KeepAlive" in Apache, or keep it on but set the KeepAliveTimeout to a lower value like 5 (the default is 15 seconds). This is set in /etc/httpd.conf

I wouldn't rely on awstats for bandwidth reporting. Look at the charts in the Linode Manager instead.

You might try asking on the lxlabs forums.

Good luck!

@hoopycat

total used free shared buffers cached

Mem: 360 315 44 0 24 81

-/+ buffers/cache: 209 151

Swap: 511 16 495

here's the free -m.

I was a bit confused with that article. I have to read it again for the 2nd time! Thanks!

@phvt

thanks for the recommendations. currently my KeepAlive is disabled so, I made no changes to httpd.

Thanks for your replies!

@virusfreee:

                   total       used       free     shared    buffers     cached
Mem:           360        315         44          0            24            81
-/+ buffers/cache:        209        151
Swap:          511         16        495

The -/+ buffers/cache is what we want to look at… that shows you've got about 151MB of memory effectively free. Subtract out the 16MB of swap used and there's a good 135MB left. Your system is using ~107MB for buffers and cache, which is pretty good.

I'd say you're probably in good shape memory-wise right now, at least. -rt

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