News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Board running slooooooooooow!!

Started by mystik, February 21, 2005, 03:31:52 PM

Previous topic - Next topic

mystik

as of lately my SMF has been running slowly.....pages suddenly starting to take longer to generate...

....i have attached two screenshots : one showing a snapshot of my Mysql prscesses at an instance where the board was running slowly and the other showing the page i was loading (which incidentaly is a thread with only one post) and the time taken to generate that page (146 seconds)  :-[ :








Pleeeeease help...i can afford for my board to be this slow periodically.....

[Unknown]

A query taking 55 seconds on the log_online table?!?!

That doesn't even look like an SMF query.  Where did it come from?  Do you have any mods installed or anything?

Try converting log_online to InnoDB instead of MyISAM.

-[Unknown]

mystik

#2
yeh i have a few mods......heres di list...wat do u think it mite be a Mod?


[Unknown]

Very much so, that query is really eating your forum.  It's the problem right there - I'm not sure which mod it would be, though.

Online users today, perhaps?

-[Unknown]

mystik

#4
sorry abt that..just realised the list didnt show....





hmm....maybe i should remove the last few mods i installed and see what happens....that would be the Location thing..... >:(

what do u think?

[Unknown]

Could be the location mod, I suppose.  That could be the Who's online query, now that I look at it again...

What if you disable who's online temporarily?

By the way, if you see something going off like that, at 50+ seconds with everything else locked, I suggest you KILL it.

-[Unknown]

mystik

well i removed it and it the board seems to be moving a Tad faster.....

are there any other tips u can give me that may help speed up generation time?

[Unknown]

Your forum is rather slow... but, 200,000 posts and 41 people online shouldn't cause that :P.

Are you on a shared or dedicated server?  Do you have "check avatar size every time it's displayed" disabled? (you should have it off!)

I'm getting page load times in the range of 14/5 seconds; that really isn't acceptable.  Are any other queries ever holding things up longer than a second?  Except for searching, no queries should run that long.

-[Unknown]

mystik

#8
i agree....!!! :(

unfortunately we are on a shared box however theres not much other activity going on in MYSQL at the same time.....i think my site has the most Mysql activity on that box daily..

also...we dont have that avatar setting on...

heres another shot....much less queries at any time than before....


[Unknown]

That's still taking too long.

How many posts do you have showing per page?  Does it help if you make the topics and attachments tables InnoDB?

How many rows are in attachments and log_online?

Can you tell me the output of this query:

SHOW CREATE TABLE wheels_forumlog_online;

-[Unknown]

mystik

#10
Maximum topics to display in the message index  30
Maximum messages to display in a topic page       15
Posts to show on topic summary                          15


rows in attachment       25,137
rows in log_online          44


Result of query:

CREATE TABLE `wheels_forumlog_online` (
`session` varchar(32) NOT NULL default '',
`logTime` timestamp(14) NOT NULL,
`ID_MEMBER` mediumint( 8 ) unsigned NOT NULL default '0',
`ip` int(11) unsigned NOT NULL default '0',
`url` text NOT NULL,
PRIMARY KEY  (`session`),
KEY `online` (`logTime`,`ID_MEMBER`),
KEY `ID_MEMBER` (`ID_MEMBER`)
) TYPE=MyISAM




[Unknown]

ALTER TABLE wheels_forumlog_online
TYPE=InnoDB;

It looks fine, but the above will make it faster, most likely.

What version of MySQL are you on?  I can't imagine why any of these queries would take this long...

What about:

SHOW CREATE TABLE wheels_forumattachments;

-[Unknown]

mystik

CREATE TABLE `wheels_forumattachments` (
`ID_ATTACH` int(11) unsigned NOT NULL auto_increment,
`ID_MSG` int(10) unsigned NOT NULL default '0',
`ID_MEMBER` int(10) unsigned NOT NULL default '0',
`filename` tinytext NOT NULL,
`size` int(10) unsigned NOT NULL default '0',
`downloads` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY  (`ID_ATTACH`),
UNIQUE KEY `ID_MEMBER` (`ID_MEMBER`,`ID_ATTACH`),
KEY `ID_MSG` (`ID_MSG`)
) TYPE=MyISAM


I'me on Mysql 4.022......ime kinda scared to do that update :-[...hmm.....should i put the board in MAintenace mode?

[Unknown]

Quote from: mystik on February 21, 2005, 07:51:30 PM
I'me on Mysql 4.022......ime kinda scared to do that update :-[...hmm.....should i put the board in MAintenace mode?

It's only the log_online table.  If you accidentally deleted that table, it'd be no great loss, and you could create it again.  I'm here - just make sure you're careful and do it to the right table.

The attachments table looks fine too!  Strange...

-[Unknown]

mystik

ok done!

CREATE TABLE `wheels_forumlog_online` (
`session` varchar(32) NOT NULL default '',
`logTime` timestamp(14) NOT NULL,
`ID_MEMBER` mediumint( 8 ) unsigned NOT NULL default '0',
`ip` int(11) unsigned NOT NULL default '0',
`url` text NOT NULL,
PRIMARY KEY  (`session`),
KEY `online` (`logTime`,`ID_MEMBER`),
KEY `ID_MEMBER` (`ID_MEMBER`)
) TYPE=InnoDB

Ben_S

Assuming the obvious guess is the url, it loads fast for me, would be interested seeing the load on the server when it's taking that long.

Have personally seen my board take ages to load when msnbot was on a test install of my board (hidden I thought) and whatever it was trying to do put a big load on MySQL and effectivly stopped it doing anything else.
Liverpool FC Forum with 14 million+ posts.

[Unknown]

This topic still takes 6+ seconds to load:

http://www.wheelsjamaica.com/wheels_forum/index.php?topic=21221.0

I'm nto sure why though, if you're certain the "check size every time" option is off...

-[unknown]


Ben_S

Wrong section, theres another option somwhere, cant say exactly where though.
Liverpool FC Forum with 14 million+ posts.

mystik

he asked me if i have the "check avatar size everytime.."  option on......thats wat i just posted....its rite there in the image above...  :-\

Advertisement: