MyBB Community Forums

Full Version: server load
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi everyone, my problem is my server load. Sometimes my forum is running very fast and sometimes it runs very,very slow, especially when I enter "deep" in the forum (subforum>subforum).
This is my query list:

Page Generation Time: 0.178426980972 seconds
No. DB Queries: 32
PHP Processing Time: 0.1631179 seconds (91.42%)
DB Processing Time: 0.0153091 seconds (8.58%)
Extensions Used: mysqli, xml Global.php Processing Time: 0.0629489 seconds
PHP Version: 5.2.12
Server Load: 1.0337
GZip Encoding Status: Enabled
No. Templates Used: 40 (46 Cached / 2 Manually Loaded)
Memory Usage: 17.25 MB (18087936 bytes)
Memory Limit: 32M



Database Queries (32 Total)
#1 - Write Query
SET NAMES 'utf8'
Query Time: 0.000150203704834

#2 - Select Query
SELECT title,cache FROM mybb_datacache
table type possible_keys key key_len ref rows Extra
mybb_datacache ALL 29
Query Time: 0.0040500164032

#3 - Select Query
SELECT * FROM mybb_sessions WHERE sid='58232c1123ac9376ab01822b2237baa6' AND ip='79.112.35.61' LIMIT 1
table type possible_keys key key_len ref rows Extra
mybb_sessions const PRIMARY,ip PRIMARY 98 const 1
Query Time: 0.000121116638184

#4 - Select Query
SELECT u.*, f.* FROM mybb_users u LEFT JOIN mybb_userfields f ON (f.ufid=u.uid) WHERE u.uid='1' LIMIT 1
table type possible_keys key key_len ref rows Extra
u const PRIMARY PRIMARY 4 const 1
f const PRIMARY PRIMARY 4 const 1
Query Time: 0.00037693977356

#5 - Write Query
UPDATE mybb_sessions SET uid='1', time='1294578977', location='/index.php?debug=1', useragent='Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CL', location1='0', location2='0', nopermission='0' WHERE sid='58232c1123ac9376ab01822b2237baa6' LIMIT 1
Query Time: 0.000481843948364

(Plugin Hook: global_start)
#6 - Select Query
SELECT * FROM mybb_board_messages WHERE enabled='1'
table type possible_keys key key_len ref rows Extra
mybb_board_messages system 1
Query Time: 9.10758972168E-5

#7 - Select Query
SELECT name, tid, properties, stylesheets FROM mybb_themes WHERE def='1' LIMIT 1
table type possible_keys key key_len ref rows Extra
mybb_themes ALL 3 Using where
Query Time: 7.20024108887E-5

#8 - Select Query
SELECT title,template FROM mybb_templates WHERE title IN ('' ,'index' ,'index_whosonline' ,'index_welcomemembertext' ,'index_welcomeguest' ,'index_whosonline_memberbit' ,'forumbit_depth1_cat' ,'forumbit_depth1_forum' ,'forumbit_depth2_cat' ,'forumbit_depth2_forum' ,'forumbit_depth1_forum_lastpost' ,'forumbit_depth2_forum_lastpost' ,'index_modcolumn' ,'forumbit_moderators' ,'forumbit_subforums' ,'index_welcomeguesttext' ,'index_birthdays_birthday' ,'index_birthdays' ,'index_pms' ,'index_loginform' ,'index_logoutlink' ,'index_stats' ,'forumbit_depth3' ,'forumbit_depth3_statusicon' ,'index_boardstats' ,'css' ,'headerinclude' ,'header' ,'footer' ,'gobutton' ,'htmldoctype' ,'header_welcomeblock_member' ,'header_welcomeblock_guest' ,'header_welcomeblock_member_admin' ,'global_pm_alert' ,'global_unreadreports' ,'' ,'global_pending_joinrequests' ,'nav' ,'nav_sep' ,'nav_bit' ,'nav_sep_active' ,'nav_bit_active' ,'footer_languageselect' ,'header_welcomeblock_member_moderator' ,'redirect' ,'error') AND sid IN ('-2','-1','12') ORDER BY sid ASC
table type possible_keys key key_len ref rows Extra
mybb_templates ALL 731 Using where; Using filesort
Query Time: 0.000133991241455

(Plugin Hook: index_start)
#9 - Select Query
SELECT DISTINCT s.uid, s.ip, s.sid, s.time, s.location, u.username, s.nopermission, u.invisible, u.usergroup, u.displaygroup FROM mybb_sessions s LEFT JOIN mybb_users u ON (s.uid=u.uid) WHERE s.time > 1294492577 ORDER BY s.time DESC
table type possible_keys key key_len ref rows Extra
s ALL time 257 Using where; Using temporary; Using filesort
u eq_ref PRIMARY PRIMARY 4 studen_forum.s.uid 1
Query Time: 0.00254201889038

(Plugin Hook: index_start)
#10 - Select Query
SELECT uid FROM mybb_sessions WHERE uid != '0' AND time > '1294578077'
table type possible_keys key key_len ref rows Extra
mybb_sessions range time,uid time 8 12 Using where
Query Time: 0.00022292137146

(Plugin Hook: index_start)
#11 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (183,155,182,1)
table type possible_keys key key_len ref rows Extra
mybb_google_seo range idtype,active active 7 3 Using where
Query Time: 8.58306884766E-5

(Plugin Hook: index_start)
#12 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (98)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 7.58171081543E-5

(Plugin Hook: index_start)
#13 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (156)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.69956207275E-5

(Plugin Hook: index_start)
#14 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (167)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 7.39097595215E-5

(Plugin Hook: index_start)
#15 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (67)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.89029693604E-5

(Plugin Hook: index_start)
#16 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (138)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 7.9870223999E-5

(Plugin Hook: index_start)
#17 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (180)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 7.20024108887E-5

(Plugin Hook: index_start)
#18 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (168)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.50882720947E-5

(Plugin Hook: index_start)
#19 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (179)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.50882720947E-5

(Plugin Hook: index_start)
#20 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (130)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.69956207275E-5

(Plugin Hook: index_start)
#21 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (177)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.69956207275E-5

(Plugin Hook: index_start)
#22 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (176)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.38961791992E-5

(Plugin Hook: index_start)
#23 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (174)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.91413879395E-5

(Plugin Hook: index_start)
#24 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (153)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.48498535156E-5

(Plugin Hook: index_start)
#25 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (172)
table type possible_keys key key_len ref rows Extra
mybb_google_seo const idtype,active active 7 const,const,const 1
Query Time: 6.50882720947E-5

(Plugin Hook: index_start)
#26 - Select Query
SELECT template FROM mybb_templates WHERE title='online24_index' AND sid IN ('-2','-1','12') ORDER BY sid DESC LIMIT 1
table type possible_keys key key_len ref rows Extra
mybb_templates ALL 731 Using where; Using filesort
Query Time: 6.38961791992E-5

(Plugin Hook: index_start)
#27 - Select Query
SELECT template FROM mybb_templates WHERE title='usergroup_legend' AND sid IN ('-2','-1','12') ORDER BY sid DESC LIMIT 1
table type possible_keys key key_len ref rows Extra
mybb_templates ALL 731 Using where; Using filesort
Query Time: 6.38961791992E-5

#28 - Select Query
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup FROM mybb_sessions s LEFT JOIN mybb_users u ON (s.uid=u.uid) WHERE s.time>'1294578077' ORDER BY u.username ASC, s.time DESC
table type possible_keys key key_len ref rows Extra
s range time time 8 12 Using where; Using temporary; Using filesort
u eq_ref PRIMARY PRIMARY 4 studen_forum.s.uid 1
Query Time: 0.000418901443481

#29 - Select Query
SELECT f.*, fr.dateline AS lastread FROM mybb_forums f LEFT JOIN mybb_forumsread fr ON (fr.fid=f.fid AND fr.uid='1') WHERE f.active != 0 ORDER BY pid, disporder
table type possible_keys key key_len ref rows Extra
f ALL 582 Using where; Using filesort
fr eq_ref fid fid 8 studen_forum.f.fid,const 1
Query Time: 0.00128102302551

#30 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=3 AND id IN (1,4,24,30,36,41,42,48,51,70,135,140,72,551,201,2,3,69,552,10,9,8,11,12,13,14,15,16,17,18,19,20,22,23,83,149,82,148,81,205,84,150,85,151,86,152,87,153,88,558,89,155,90,156,91,157,92,158,93,159,95,161,97,162,29,28,25,26,27,96,165,98,166,101,167,100,164,99,163,31,32,33,34,35,102,168,103,169,104,170,105,171,106,172,37,38,39,40,107,173,108,174,109,175,110,176,43,44,45,46,47,111,177,112,178,113,179,114,181,115,182,49,50,116,180,117,183,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,543,118,184,119,185,120,186,121,187,122,188,123,189,124,190,125,191,126,192,127,193,128,194,129,195,130,196,131,197,132,198,133,199,134,200,71,203,560,562,73,74,75,76,559,79,136,137,138,139,556,142,143,141,554,550,144,145,146,219,220,221,222,223,224,225,226,227,228,206,207,208,209,210,211,212,213,214,215,216,217,218,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,286,285,287,288,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,451,452,453,454,455,456,457,458,459,460,461,440,441,442,446,443,444,445,447,448,449,450,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,398,399,400,401,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,350,351,390,391,392,393,394,395,396,397,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,204,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,544,545,547,548,549,555,265,266,267,561,563,564,565,566,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599)
table type possible_keys key key_len ref rows Extra
mybb_google_seo ref idtype,active active 3 const,const 48 Using where
Query Time: 0.000554084777832

#31 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=4 AND id IN (151,17,2,128,102,59,239,11,37,15,16,38,81,84,199,99,39,40,79,78,77,12,200,76,41,42,210,95,250,252,255,257,258,259,260,113,254,247,244,221,202,44,201,198,197,194,190,130,193,174,170,271,101,234,274,273,122,211,68,153,94,268,105,87,23,72,73,22,91,89,207,104,75,237,57,266,235,96,245,231,227,112,106,110,109,108,175,182,180,181,177,183,178,179,176,272,21,6,263,264,265,138,139)
table type possible_keys key key_len ref rows Extra
mybb_google_seo ref idtype,active active 3 const,const 48 Using where
Query Time: 0.00017786026001

#32 - Select Query
SELECT url,id FROM mybb_google_seo WHERE active=1 AND idtype=1 AND id IN (155,78,90,64,1,67,156,132,167,146,178,182,98)
table type possible_keys key key_len ref rows Extra
mybb_google_seo range idtype,active active 7 10 Using where
Query Time: 0.000159025192261

Template Statistics
Templates Used (Loaded for this Page) - 40 Total
global_pm_alert, index, header_welcomeblock_member, header_welcomeblock_member_moderator, header_welcomeblock_member_admin, redirect, gobutton, forumbit_depth2_forum, forumbit_depth3, forumbit_depth3_statusicon, forumbit_subforums, footer, headerinclude, nav_sep, nav_sep_active, header_welcomeblock_guest, header, forumbit_depth1_cat, global_unreadreports, global_pending_joinrequests, index_loginform, index_whosonline, index_stats, index_birthdays_birthday, forumbit_moderators, index_birthdays, index_logoutlink, error, index_whosonline_memberbit, forumbit_depth2_cat, nav, nav_bit, nav_bit_active, htmldoctype, footer_languageselect, index_boardstats, forumbit_depth2_forum_lastpost, forumbit_depth1_forum_lastpost, online24_index, usergroup_legend

Templates Requiring Additional Calls (Not Cached at Startup) - 2 Total
online24_index, usergroup_legend


And my active plugins:
Advanced Quick Reply Form (1.0.3)
Ajax PM Notification (1.8.1)
Auto Media (1.1.9)
Board Messages (2.0.1)
Spider Bots (1.1)
Contact Form (3.1)
Fit on Page (2.3)
Google Analytics (1.5)
Google SEO (1.1.13)
iShare (1.1.0)
My Ad Manager (1.1.5)
My Meta Tags (2.1a)
Online 24 (2.2)
Page Manager (1.5.2)
Private Messages Admin (2.4.3)
Quick Reply PM (1.3)
Usergroup legends (2.0)


I also deactivated all the plugins and restored to the default template but I didn't see any major difference in the processing time from "Page Generation Statistics".
Forum is: http://www.studentimea.ro

Thank you very much!
Are you on shared hosting?? If you are, then the server load should be taken with a big handful of salt, as it's the server load of all the sites on your server combined, not just yours.

Google SEO runs 18 queries, as it needs to get the SEO URL from the database, that might be why it's slower the further into the forum structure you go, but all the queries are running quickly.
Yes I'm on a shared hosting. I think this is the explanation for the fact that sometimes the forum loads fast and sometimes slow, no?
Yes, it will be. It depends on what other sites on your server are doing and how many people are accessing them.
i had the same problem
so i switched to a dedicated server
and havnt had any problems since
90% of page generation time here was spent in PHP so you can ignore the database queries entirely. Unfortunately the details don't easily show what was causing PHP to take so long. Maybe the host is slow. Maybe a plugin has an expensive while() loop somewhere. It's possible to waste time even without any database queries... then there's always the possibility that a page is generated quickly but the webserver takes time to actually deliver the generated page. That's what happened if it takes 10 seconds to load a page while the generation timer says 0.0x seconds.

Unfortunately it's not easy to debug...
18 queries for Google SEO (HOLY CRAP)
2 template queries which you can fix by adding "online24_index, usergroup_legend" to the template cache

Honestly speaking Google SEO is now on my top 3 list for worst plugins to run. No offense to the author but that's a massive load to add to a page. You can see on the query time for some of them that they took 6-8 seconds.

Deactivate that one plugin and see if you have a performance difference.
(2011-01-09, 07:30 PM)labrocca Wrote: [ -> ]You can see on the query time for some of them that they took 6-8 seconds.

No offense taken... of course it's still not optimal to have so many queries, but it's not anywhere near as bad as you're making it out to be.

6.69956207275E-5 seconds == 0.0000699 seconds...

It switches from 0.000 notation to x*10^-y for queries that are too fast. Wink

The total DB processing time in the example above was 0.015 seconds. Which is acceptable especially on a shared host...

Quote:Templates Requiring Additional Calls (Not Cached at Startup) - 2 Total
online24_index, usergroup_legend

Those aren't causing immediate problems either, but it's usually easy to get templates cached, maybe suggest it to the authors of those plugins.
I was facing same problem of Server Load without even Google Seo when i was on Shared Hosting. But after i buy Dedicated server even i am using Google Seo too with ProStats too no server load issue came even when 450+ users are online at a time. and my SQL Queries: 31 are on Index and SQL Queries: 37 on showthread

I can recommend Dedicated server if your forum is making enough money to bear the cost.
Ahh..read it as 6.6 seconds. Smile

But still he's running the plugin which is doubling his query count. I still think he should disable to review performance difference.

Memory Usage: 17.25 MB (18087936 bytes)

That's high too imho. For HF my normal mem usage is under 4Mb.

What's "iShare (1.1.0)"?

And I'll be very honest here. 1.6x has some real performance problems built-in. Since I can't get official support (because of HF) I can't really open a dialog in support section. But I have reported what I know are real problem such as templates not being in cache (causes extra queries) and how the new breadcrumb is a resource hog. I want a switch for that feature asap. Then there is a loop problem with a function to check mod permissions. I reported that too.

HF was using 600 queries per second under 1.4x. With 1.6x I'm doing 1300 queries per second. Why twice the queries I'm still looking into. I've already butchered the core files to remove many queries or to rewrite them.

Something with 1.6x ain't cool and I think we're going to continue to see complaints from hosts.

Quote:SQL Queries: 31 are on Index and SQL Queries: 37 on showthread

I run 10 for index and 23 for showthread. Showthread will be a lot less once I rewrite My Awards. Oh in case you're wondering my forumdisplay is 19 queries. Yet I'm still doing 1300 queries per second on average. At peak times I know I'm doing 3000 queries per second. Right now HF has 1100 users online in the past 5 mins.
Pages: 1 2