Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 08:23 pm EDT

Geeklog Forums

SQL and System Loading (Very High Load Averages)


Status: offline

Armitage

Forum User
Junior
Registered: 12/10/04
Posts: 15
Location:D.C.
My Geeklog site has recently been getting a lot of traffic (20+ simultaneous users) which started dragging my system to it's knees. Load averages were constantly 3+ although CPU utilization was low and there was plenty of free memory.

Despite this, I had a better system lying around so I threw it in (upgraded from an athlon 700 with 512m to a thunderbird 1.2ghz with 1GB ram) and the load averages remained exactly the same.

Now, there's a direct correlation between page loads and load average -- I can click reload on my geeklog page over and over and watch the load go up and up and up.

The first thing I tried was configuring mysql's conf file to use more memory and such. Doing so (using 512m ram) improved GL's page rendering time, dropping it by about half! However, load averages remain high.

Here is a snapshot of top, showing exactly what i mean. Plenty of idle CPU time, no iowait, sufficient free memorry... And high load...

10:50:30 up 49 min, 2 users, load average: 1.92, 0.99, 0.79
97 processes: 95 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 71.8% user 10.9% system 0.0% nice 0.0% iowait 17.1% idle
Mem: 1030932k av, 1015824k used, 15108k free, 0k shrd, 13296k buff
791564k actv, 0k in_d, 20704k in_c
Swap: 519168k av, 58132k used, 461036k free 818836k cached

Can anyone explain this behavior and how i might fix it? Once the load reaches 3 or higher, the system starts grinding to a halt and has become completely unresponsive several times in the last few days (loads of 15 or higher, mysql processes out of control, everything locks up and the system must be hard rebooted).

Thanks!
---
Matthew R. Demicco (matt@demicco.net) - armitunes.com
 Quote

Status: offline

Armitage

Forum User
Junior
Registered: 12/10/04
Posts: 15
Location:D.C.
Hrm, I just looked at that snapshot. The CPU utilization is somewhat high for the purposes of demonstration. Usually it hovers around 13-20% user, 0 system, 0 nice, 0 iowait and ~80 idle... still with high load averages tho. Sorry for the bad example.
---
Matthew R. Demicco (matt@demicco.net) - armitunes.com
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Thats really not very busy. My load currently for a computer running 6 sites and about 45 concurrent users is 0.03. (I do have scsi disks though). Have you looked at your database lately? If you are running my stats plugin the disk usage can go way up if you don't delete data periodically. You should also run table compacting/repair. Dirk made a nice script for this.

Having said all that -- verify that it is mysql that is causing the load. I had an errant php script that brought the webserver to its knees once.

TomW
 Quote

All times are EDT. The time is now 08:23 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content