[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Mysql causes high server load-connection problem?



I am trying to find out why my Cobalt Raq4i (512 Mb RAM) can not handle a mere 15000 pageviews per day, with 10000 of these occouring in a 3 hour period.

THe website is www.bettingadvice.com 

I'm running PHP4.06, and Mysql 3.23.37 on Apache 1.3.11

The php code is fairly optimised, I think, as is the sql-quiries. THere are a lot of queries, though. Often 6-8 per pageview, as the site is buildt by several php-modules, some of them nested.

I'm running 1 connection to the database per page, and closing the connection at the bottom of each page.

Is it better, in terms of bringing down the load, to use persistent connections ?
 Can anyone explain to me the advantages/disadvantages of using persistent connections for this kind of site (heavy user interaction, as the users are updating the database quite often.

There is approx 6-7000 unique users pr day in the weekends, and the peak hours are from 10 AM to 14 PM on Saturdays and Sundays.

Using "top", I have monitored the load, and 1 min load are often around 40 in peak hours, and 15 min average have sometimes been well over 15, sometimes over 20, which is ofcourse hazardious.

The server has recently got an update from 256 to 512 Mb RAM. I have also tried to tweak MySQL a little nby increasing a few parameters, among those "table_cache" from 64 Kb to 256 Kb, "key_buffer_size" to 256 MB,  etc.

Today I experienced connection timeouts, (max_connections are set to 100), now increased to 200.

I've tried to do some tweaking as explained on http://wdvl.internet.com/Authoring/DB/SQL/Optimize/optimize2_3.html

but I'm not sure this is doing the trick.

Anyone got some answers or ideas about how to reduce the load ?

It is worth mentioning that under "normal" traffic, the server runs on normal load (around, or below 1)

-----------------------------------------------------------

Best regards

Terje Grefstad

www.bettingadvice.com
Phone: +47 40000311
Fax: +47 40100311

" Veni, vidi, nates calce concidi."
 ~ I came, I saw, I kicked ass