Advertisement:

Author Topic: MySQL sleeping processes problem  (Read 21844 times)

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #20 on: September 18, 2012, 05:58:02 AM »
Linux 2.6.32-042stab053.5

Parallels Plesk Panel v10.4.4_build1013111102.18 os_Debian 5.0

This is all i know...

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #21 on: September 18, 2012, 06:09:13 AM »
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


Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #22 on: September 18, 2012, 06:38:10 AM »
It didn't work. But i Phoned to the support desk and they are going to install it on the server.

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #23 on: September 18, 2012, 07:44:41 AM »
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.

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #24 on: September 18, 2012, 08:32:53 AM »
You should see a lot less apache clogging with APC enabled.
Let me know if you still encounter any issue.

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #25 on: September 18, 2012, 01:36:29 PM »
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)



Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #26 on: September 18, 2012, 02:20:24 PM »
could you type the following in an ssh shell:
Code: [Select]
free
and paste the results here.


Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #27 on: September 18, 2012, 02:59:20 PM »
could you type the following in an ssh shell:
Code: [Select]
free
and paste the results here.
How to do this? Start the SSH connection and type free in the console?

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #28 on: September 18, 2012, 03:01:20 PM »
yes that's it. ;)

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

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #29 on: September 19, 2012, 08:54:36 AM »
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

Offline butch2k

  • Full Member
  • ***
  • Posts: 416
  • Gender: Male
    • @butch2k on Twitter
    • Planète Roliste
Re: MySQL sleeping processes problem
« Reply #30 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.  ;)

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #31 on: September 19, 2012, 09:13:47 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!

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #32 on: December 18, 2012, 03:41:40 AM »
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.

Offline CoreISP

  • Server Admin
  • Server Team
  • SMF Super Hero
  • *
  • Posts: 18,003
  • Gender: Male
  • Liroy van Hoewijk
    • coreisp on GitHub
    • liroyvh on LinkedIn
    • @liroyvh on Twitter
Re: MySQL sleeping processes problem
« Reply #33 on: December 18, 2012, 10:12:27 AM »
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.

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #34 on: December 19, 2012, 07:21:57 AM »
Sounds like you have persistent connections enabled?

See second post in topic, persistent connections is off.

Offline CoreISP

  • Server Admin
  • Server Team
  • SMF Super Hero
  • *
  • Posts: 18,003
  • Gender: Male
  • Liroy van Hoewijk
    • coreisp on GitHub
    • liroyvh on LinkedIn
    • @liroyvh on Twitter
Re: MySQL sleeping processes problem
« Reply #35 on: December 19, 2012, 08:01:08 AM »
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.

Offline Storman™

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,027
Re: MySQL sleeping processes problem
« Reply #36 on: December 19, 2012, 01:00:15 PM »
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 ?
Any Backup method is bettter than no Backup method....

Offline aman@odigma.com

  • Newbie
  • *
  • Posts: 7
Re: MySQL sleeping processes problem
« Reply #37 on: December 28, 2012, 01:39:52 AM »
thanks

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #38 on: January 02, 2013, 01:26:30 PM »

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?

Offline jan.van.gent

  • Semi-Newbie
  • *
  • Posts: 70
Re: MySQL sleeping processes problem
« Reply #39 on: January 02, 2013, 02:17:51 PM »
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?