Previous Thread
Next Thread
Print Thread
Hop To
#231953 12/09/2009 11:15 PM
Joined: Oct 2009
Posts: 4
R
stranger
stranger
R Offline
Joined: Oct 2009
Posts: 4
Any help would be greatly appreciated

I'm currently hosting a popular forum at forums.weddingbells.ca and I just recently migrated and upgraded the whole site. I went from running it on a dedicated server to a virtual server.
I went from running it on ubb 6.5 to 7.5.3

I currently have ~32,000 uses, 120,000 topics and 1.7 million posts.

The server is on ubuntu 9.04 with 8G of RAM, but my load averages are up in the 50s when the site is busy.

It seems that mySQL is the bottleneck here. I ran mysqltuner to try to improve things, I followed the suggestions it made and I'll keep trying it.

Top shows
top - 22:13:02 up 2:10, 1 user, load average: 41.09, 31.77, 30.51
Tasks: 218 total, 2 running, 216 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.6%us, 32.6%sy, 0.0%ni, 55.5%id, 0.2%wa, 0.0%hi, 0.0%si, 0.1%st
Mem: 8388828k total, 3691272k used, 4697556k free, 18708k buffers
Swap: 16777208k total, 0k used, 16777208k free, 1927184k cached

i started the slow query log and I noticed that there is one query that keeps appearing frequently, but I don't know where it's coming from

# User@Host: forums[forums] @ localhost []
# Query_time: 43 Lock_time: 0 Rows_sent: 1 Rows_examined: 369772
SELECT COUNT(p.POST_ID) AS POSTS, SUM(p.POST_IS_TOPIC) AS TOPICS, t.FORUM_ID
FROM ubbt_POSTS as p,
ubbt_TOPICS as t
WHERE (t.TOPIC_ID = p.TOPIC_ID) AND p.POST_IS_APPROVED = 1
AND (0
OR (t.FORUM_ID = 15 AND p.POST_POSTED_TIME > 0)) GROUP BY t.FORUM_ID;
#


At this point I'll take any suggestions.

rvretenar #231956 12/09/2009 11:59 PM
Joined: Oct 2009
Posts: 4
R
stranger
stranger
R Offline
Joined: Oct 2009
Posts: 4
After reading through other various posts, it looks like the culprit was

Show total # of unread posts per forum?
Warning: This can cause excess load and contribute to slow speed.

Turning this off drastically improved my slow server

rvretenar #231962 12/10/2009 3:18 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Yeah, that can definitely be a big drain. Since it has to count all of the unread posts. Some users only visit a couple forums so the number of unread posts grow in the other forums and makes it worse.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 767 guests, and 208 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)