Disc io rate - Running Django/Mysql/Apache/Postfix

I have a linode512, and recently I'm serious problem with I / O rate, I am monitoring the server using Munin and he always shows me the server using minimal resources, and a time to another (not always at times of peaks) it stops responding and I start getting emails from I / O rate on disk.

On this server I am running four projects in django / mysql / apache without a huge traffic.

There were many errors in the logs (urls old that no longer exist), then thinking that the problem would be written in the logs on disks I commented the lines for the access log of apache, but the problem persists.

Has anyone experienced this and can help me?

2 Replies

Do you mean the logs are still being written to disk or despite the fact that you turned off logging you still have high IO? In the first case, I'd ask if you restarted apache. In the second case, I'd suggest the following:

Inspect your code: your apps might be hitting the disk on every request. look out for stuff like that and fix it.

Caching: Django has helpers that assist in caching. You can alter your code to do caching, or if you're using contributed apps look into seeing if you can turn on caching for them (you'll of course need to get memcache running for that)

Template cached loader: Search for "django.template.loaders.cached.Loader" in the following page: http://docs.djangoproject.com/en/1.2/ref/templates/api/ so that Django doesn't have to hunt through your filesystem every time a template needs to be fetched.

MAKE SURE YOU READ THE NOTE ABOUT THREAD SAFETY. MAKE SURE YOU UNDERSTOOD THAT NOTE AND THE PAGE IT LINKED TOO

Also, are you sure there's no pattern to when the server stops responding? You might have a mysql backup job that's locking all your tables, or it could be a dozen other things.

hi,

if this have a pattern I have not discovered. I'll take a look at projects that are running and I will add to the cache at least with more hits to see if it solves my problem. Thanks.

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