View Single Post
  #6 (permalink)  
Old 01-03-2008, 10:19 PM
AshDigg's Avatar
AshDigg AshDigg is offline
Mayor of PliggVille
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Quote:
Originally Posted by argh2xxx View Post
I found the cause of the high load is from mysql by user 'mypligg'


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2788 mysql 21 6 180m 107m 3660 S 396 3.5 1315:58 mysqld


[root@server ~]# mysqladmin proc
+-------+-----------------+-----------+-----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+-----------------+-----------+-----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| 29083 | mypligg | localhost | mypligg | Query | 10 | Locked | SELECT count(*) FROM pligg_links WHERE link_url = 'http://www.msnbc.msn.com/id/7969739/displaymode/1 |
| 37912 | mypligg | localhost | mypligg | Query | 21 | Locked | UPDATE pligg_links set `link_reports`=0, `link_comments`=0, link_author=1, link_status='published', |
| 46126 | mypligg | localhost | mypligg | Query | 21 | Locked | UPDATE pligg_links set `link_reports`=0, `link_comments`=0, link_author=1, link_status='published', |
| 47538 | mypligg | localhost | mypligg | Query | 21 | Locked | UPDATE pligg_links set `link_reports`=0, `link_comments`=0, link_author=1, link_status='published', |
| 48385 | mypligg | localhost | mypligg | Query | 32 | Sorting result | SELECT link_id FROM pligg_links WHERE link_status='published' ORDER BY link_date DESC LIMIT 0,5 |
| 48395 | mypligg | localhost | mypligg | Query | 3 | Locked | SELECT pligg_links.* FROM pligg_links WHERE link_id = 131424 OR link_id = 131423 OR link_id = 1 |
| 48397 | mypligg | localhost | mypligg | Query | 21 | Locked | UPDATE pligg_links set `link_reports`=0, `link_comments`=0, link_author=1, link_status='published', |
| 48409 | mypligg | localhost | mypligg | Query | 20 | Locked | SELECT link_id FROM pligg_links WHERE link_status!='discard' AND (link_category=6 ) ORDER BY link |
| 48410 | mypligg | localhost | mypligg | Query | 32 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48412 | mypligg | localhost | mypligg | Query | 20 | Locked | SELECT pligg_links.* FROM pligg_links WHERE link_id = 131233 OR link_id = 130948 OR link_id = 1 |
| 48415 | mypligg | localhost | mypligg | Query | 8 | Locked | SELECT pligg_links.* FROM pligg_links WHERE link_id = 131424 OR link_id = 131423 OR link_id = 1 |
| 48416 | mypligg | localhost | mypligg | Query | 31 | Sorting result | SELECT link_id FROM pligg_links WHERE link_status='published' ORDER BY link_date DESC LIMIT 0,5 |
| 48417 | mypligg | localhost | mypligg | Query | 5 | Locked | SELECT pligg_links.* FROM pligg_links WHERE link_id = 131424 OR link_id = 131423 OR link_id = 1 |
| 48508 | mypligg | localhost | mypligg | Query | 31 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48509 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48511 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48510 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48512 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48513 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48514 | mypligg | localhost | mypligg | Query | 30 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
| 48515 | mypligg | localhost | mypligg | Query | 29 | Copying to tmp table | select *, count(*) as count from pligg_links, pligg_categories where category_lang='en' and categor |
And a lot more of these bu I only posted a few.|
+-------+-----------------+-----------+-----------------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+

The similar querries to the above made my server's load shot up to 30 and sometime 38, and can go even more beyond than just those two digit numbers. This is a dedicated dual core dual processor Xeon with 3GB and SCSI HD.

Those update ones are interesting, I'll look into that. The last couple ones, the category type ones, I'm working on those ones and should be fixed for the next release.

thanks
__________________
- Ash
Reply With Quote