In my ongoing quest for better performance, I solved a major perf. problem on my server.
When I did "top" before, it was showing me huge iowaits, approaching 90% which was dragging the server down. The problem turned out to be related to tables not being optimized.
When large number of rows are deleted from tables, then the index is not properly sorted and the tables include a lot of garbage as well. As a result, performance is seriously degraded.
I have written a cron job to optimize tables nightly.
Note that in mysql, "optimize LOCAL.." LOCAL does not work. I am checking this out, but you can always use it without the LOCAL arg.
As a result of optimizing, my iowait is now down to 10% and the server is performing like a champ (he he, no need to get a new server!!).
Don't believe mysql docs that optimization is not necessary.
as you seem to know a lot about speed (or in my case the opposite) stuff, perhaps you could give me some advice.
I'm on a shared server and my php-processing times for my index page range from 0.3 (it's possible, I've seen it, though rarely) to 55 seconds.
I am absolutely clueless about how to track down the reason(s) for this. I too had the idea that it could be related to tables needing to be optimized, had quite a few, optimized them but that didn't help.
My host has no clue. From observing it, the number of visitors is not the key. My second site hosted on the same space, using a seperate database, index page nearly the same, 'loaded' (parsed) in 0.184 seconds while the problematic one took 22... it drives me crazy.
Are there any tools I can use on a shared server to analyze the situation?
P.S.:
Both sites are GT-NExtGEn tapped and I'm using the 'speed freaks' functions in mainfile.php.
See if mysql query cache is on. To test that, go to phpmyadmin, and run the same query multiple times. If after the 1st run, the response time dramatically improves, you have the cache on. Otherwise, you may have to talk to your host, or move your host. Query cache is almost a MUST.
There may be more to do, but I suggest doing these and seeing what happens. I am 75% sure your problem would be fixed by doing the above.
Thanks for the advice, put indeces to both of the tables, the parsing time was about 6 seconds directly before and after, I had some hopes in this, as I am using forum center blocks. But the time didn't change, well my forums are very small anyway. I'll watch if the times are increasing as ridiculously as before again.
I also tried the mysql cache, which seems to work as the query times on some of the biggest tables nearly cut down to half the second time I ran them.
I'll try and interrogate my host again. Perhaps (I've read somewhere that this could be a cause) some client on the same db-server is causing very high load...
Shoot me, I'm an idiot (at least have tendencies to be from time to time).
I was again comparing what could be different between my two sites and what could externally influence the loading times.
RSS has always been a pain in the ar$$ that's why i never use it.
The problem is, that a server doesn't record the Domain Names properly most of the time.
A faster approach is to use the IP of the server where you want your data from.
Also updating the RSS once in 5 hours and put the data into DB will give better results.
Another RSS issue occures when the server is down.
Your website tries to recieve info from a "non-existing" website which results your website is down as well.
A better solution would be JavaScript/Flash based blocks which connect to the RSS feed, and process the data.
Then about OPTIMIZE:
somewhere on this server are links to an old admin add-on from me which allows you to control a lot of database options thru the admin area.
Tables that need optimization often if module is used often:
_bbposts
_bbposts_text
_bbprivmsgs
_bbprivmsgs_text
_bbsearch_results
_bbsearch_wordlist
_bbsearch_wordmatch
_comments
_counter
_cpg_pictures
_downloads_downloads
_downloads_newdownload
_poll_check
_pollcomments
_stats_date
_stats_hour
_stats_month
_stories
_users
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum