News:

Wondering if this will always be free?  See why free is better.

Main Menu

MySQL sleeping processes problem

Started by jan.van.gent, September 16, 2012, 03:55:17 PM

Previous topic - Next topic

jan.van.gent

Linux 2.6.32-042stab053.5

Parallels Plesk Panel v10.4.4_build1013111102.18 os_Debian 5.0

This is all i know...

butch2k

ok try:
sudo apt-get update
sudo apt-get install php-apc (if it does not work try php5-apc instead of php-apc)

if the line above does not work no need to use the next one.
sudo /etc/init.d/apache2 restart


jan.van.gent

It didn't work. But i Phoned to the support desk and they are going to install it on the server.

jan.van.gent

OK it's installed now, and the text was green (apc detected) so now I've set at level 1.

Thank you for the help so far! I hope the problem will be solved now.

Current status:
asic Information
September 18, 2012, 01:43:41 PM
Operating System:    Linux 2.6.32-042stab053.5
Processor:    Intel® Xeon® CPU L5520 @ 2.27GHz (2261.033MHz)
Load averages:    0.48, 0.39, 0.44
Current processes:    66 (64 sleeping, 1 running, 1 zombie)
Processes by CPU:    apache2 (33) 62.9%, mysqld (1) 4.2%, (other) (25) 0.0%
Memory usage:    42.47% (890660k / 2097152k)
Swap: 0% (0k / 0k)
MySQL Statistics
MySQL 5.0.x
Connections per second:    1.8565
Kilobytes received per second:    6.3491
Kilobytes sent per second:    64.6863
Queries per second:    32.1854
Percentage of slow queries:    0
Opened vs. Open tables:
(table_cache)    125.7969 (should be <= 80)
Table cache usage:
(table_cache)    1 (should be >= 0.5 and <= 0.9)
Key buffer read hit rate:
(key_buffer_size)    0.0036 (should be <= 0.01)
Key buffer write hit rate:
(key_buffer_size)    0.0644 (should be <= 0.5)
Thread cache hit rate:
(thread_cache_size)    61.5287 (should be >= 30 )
Thread cache usage:
(thread_cache_size)    0.875 (should be >= 0.7 and <= 0.9)
Temporary table disk usage:
(tmp_table_size)    0.0607 (should be <= 0.5)
Sort merge pass rate:
(sort_buffer)    0 (should be <= 0.001)
Query cache enabled:
(query_cache_type)    1 (should be >= 1 and <= 1)
Query cache miss rate:
(query_cache_limit)    0.3344 (should be <= 0.5)
Query cache prune rate:
(query_cache_size)    0.1259 (should be <= 0.05)


I'm curious what the result will be tonight, when there are lot's of visitors/members.

butch2k

You should see a lot less apache clogging with APC enabled.
Let me know if you still encounter any issue.

jan.van.gent

OK now my forum it crowded.

The speed is still ok!


The only thing that still worries me is the fact that the RAM usage is still around 90% .
(VPS with 2 gig RAM)

Amount of visitors atm:
44 guests, 80 members

Is this amount of ram usage normal?

Stats:
Operating System:    Linux 2.6.32-042stab053.5
Processor:    Intel® Xeon® CPU L5520 @ 2.27GHz (376.838MHz)
Load averages:    0.61, 0.56, 0.81
Current processes:    74 (69 sleeping, 4 running, 1 zombie)
Processes by CPU:    apache2 (45) 60.8%, mysqld (1) 4.6%, (other) (22) 0.0%
Memory usage:    89.139% (1869388k / 2097152k)
Swap: 0% (0k / 0k)
MySQL processes
Total processes:    4 (3 sleeping, 1 running, 0 locked)
MySQL Statistics
MySQL 5.0.x
Connections per second:    2.3273
Kilobytes received per second:    7.1791
Kilobytes sent per second:    71.6654
Queries per second:    35.5276
Percentage of slow queries:    0
Opened vs. Open tables:
(table_cache)    187.1875 (should be <= 80)
Table cache usage:
(table_cache)    1 (should be >= 0.5 and <= 0.9)
Key buffer read hit rate:
(key_buffer_size)    0.0042 (should be <= 0.01)
Key buffer write hit rate:
(key_buffer_size)    0.0572 (should be <= 0.5)
Thread cache hit rate:
(thread_cache_size)    74.2663 (should be >= 30 )
Thread cache usage:
(thread_cache_size)    0.625 (should be >= 0.7 and <= 0.9)
Temporary table disk usage:
(tmp_table_size)    0.0524 (should be <= 0.5)
Sort merge pass rate:
(sort_buffer)    0 (should be <= 0.001)
Query cache enabled:
(query_cache_type)    1 (should be >= 1 and <= 1)
Query cache miss rate:
(query_cache_limit)    0.3703 (should be <= 0.5)
Query cache prune rate:
(query_cache_size)    0.0806 (should be <= 0.05)



butch2k

could you type the following in an ssh shell:
free

and paste the results here.


jan.van.gent

Quote from: butch2k on September 18, 2012, 02:20:24 PM
could you type the following in an ssh shell:
free

and paste the results here.
How to do this? Start the SSH connection and type free in the console?

butch2k

yes that's it. ;)

you should get smthg like this
             total       used       free     shared    buffers     cached
Mem:      16456712   15376420    1080292          0      46124   11168792
-/+ buffers/cache:    4161504   12295208
Swap:      1044220          0    1044220

jan.van.gent

ok the current status (not so crowded):

Total
mem: 2097152 , used: 1568064, free: 529088, shared: 0, buffers: 0, cached: 1346940

-/+buffers/cashe: 221124  1876028

swap: 0 0 0

The speed is excellent

butch2k

About 1.8GB of your memory is used for caching and buffers, this is free memory being used for system optimization, but could be recovered for software use if a process need more memory. In fact you use just 220MB, so you are fine, no memory issue at all.  ;)

jan.van.gent

Quote from: butch2k on September 19, 2012, 09:12:22 AM
About 1.8GB of your memory is used for caching and buffers, this is free memory being used for system optimization, but could be recovered for software use if a process need more memory. In fact you use just 220MB, so you are fine, no memory issue at all.  ;)
Great!

Thank you so much for your help. I owe you one!

jan.van.gent

I have problems again.

Again with the sleaping processes.
After a mysql restart the server goes very smooth, but after a while on certain moments the server gets realy slow.
Any ideas how to solve this?

According to the hosting I have a LOT of sleaping Myscl processes.

LiroyvH

Sounds like you have persistent connections enabled?
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

jan.van.gent

Quote from: CoreISP on December 18, 2012, 10:12:27 AM
Sounds like you have persistent connections enabled?

See second post in topic, persistent connections is off.

LiroyvH

Mhm, then it sounds like you will have to start looking at the modifications. I'd begin with anything ajax, if any.

Define "a lot" of sleeping processes though?
Have you looked in to it yourself?
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Storman™

Which of those mods do you actually have installed as I don't see many on your forum. Or if they are there then you're only using them "lightly".

Also, with the levels of activity you've described your forum should rock on the spec you've listed. I have about 8 forums running like that on a similar system and they are all pretty busy without any lag. Have you got anything else running in Plesk, like Spamassassin, or something else like that ?


jan.van.gent


Modificatienaam   Versie   
1.   Tapatalk SMF 2.0 RC5/Final Plugin   3.3.0   [ Deïnstalleer ]
2.   SMF Arcade   2.5 RC1.1D   [ Deïnstalleer ]
3.   SMF Trader System   1.6   [ Deïnstalleer ]
4.   SimplePortal   2.3.5   [ Deïnstalleer ]
5.   SMF 2.0.2 Update   1.0   [ Deïnstalleer ]
6.   Highslide 4 SMF   0.8.1   [ Deïnstalleer ]
7.   Event Registration Mod for SMF2   2.19   [ Deïnstalleer ]
8.   Stop Spammer   2.3.9   [ Deïnstalleer ]
9.   SimpleAds   1.0.1   [ Deïnstalleer ]
10.   Aeva ~ Auto-Embed Video & Audio   7.1

(simple portal is not used)

Which one is likely to cause issues?

jan.van.gent

No spam assisin running.


http://www.simplemachines.org/community/index.php?topic=50217.0 --> could it be that i should change some stuff to innoDB? How to check?

Advertisement: