Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: bros on March 23, 2011, 12:03:18 AM

Title: Having a speed issue with forums
Post by: bros on March 23, 2011, 12:03:18 AM
So I recently tossed my forums onto a Linode VPS (The 512 with 512 MB RAM)

469600 Posts in 25237 Topics by 3289 Members

Caching (Level 1, XCache) is enabled

Apache2 server with php5 on Debian. MySQL database.

http://thecastlehall.no-ip.org/phpinfo.php

There is intermittent sluggishness of the forums.
Title: Re: Having a speed issue with forums
Post by: ziycon on March 23, 2011, 05:26:27 AM
The memory limit is set to 128MB from what I can see, you may need to look at the way apache is configured with regard to max_clients and memory_limit, have a read over this(http://stackoverflow.com/questions/1425138/increasing-php-memory-limit-at-what-point-does-it-become-insane) link and see if it helps.
Title: Re: Having a speed issue with forums
Post by: bros on March 23, 2011, 02:32:13 PM
So I uploaded status.php

Current processes:   163 (160 sleeping, 3 running, 0 zombie)
Processes by CPU:   apache2 (17) 4.3%, (other) (67) 0.4%
Memory usage:    92.702% (473384k / 510652k)
Swap: 28.939% (75860k / 262136k)

Things that are marked:
Opened vs. Open tables:
(table_cache)    143.3438 (should be <= 80)

Table cache usage:
(table_cache)    1 (should be >= 0.5 and <= 0.9)

Key buffer read hit rate:
(key_buffer_size)    0.0122 (should be <= 0.01)

Key buffer write hit rate:
(key_buffer_size)    0.5255 (should be <= 0.5)

Query cache prune rate:
(query_cache_size)    0.0647 (should be <= 0.05)
Title: Re: Having a speed issue with forums
Post by: Something like that on March 23, 2011, 02:48:08 PM
Have you followed Twenty-four things you can do to make SMF go faster (http://www.simplemachines.org/community/index.php?topic=293441.0)?
Title: Re: Having a speed issue with forums
Post by: bros on March 23, 2011, 02:58:37 PM
Quote from: «Mark» on March 23, 2011, 02:48:08 PM
Have you followed Twenty-four things you can do to make SMF go faster (http://www.simplemachines.org/community/index.php?topic=293441.0)?

1. Don't allow people to upload avatars
2. Done
3. Just did that now
4. Already done
5. Creating a Large Custom Index now
6. don't use
7. Don't think I have it enabled
8. Should probably do
9. Need all the boards
10. Disabled Calendar already
11. Not going to use because I am on a VPS
12. Already using DB Driven Sessions
Addition 1. Have quite a few zero post members who are new and just haven't posted yet :P
Addition 2. Done
Addition 3. I'd have to see if the members wouldn't get reallly angry if I capped the posts in a topic :P
Addition 4. Already set to 15 minutes
Addition 5. Forum isn't really THAT CPU intensive

And that is it for the ones before the Intermediate ones.
Title: Re: Having a speed issue with forums
Post by: Spale on March 27, 2011, 03:17:03 PM
Try to optimize your database tables via phpMyAdmin. That simple step solved my forum sluggishness.
Title: Re: Having a speed issue with forums
Post by: Arantor on March 27, 2011, 03:18:11 PM
Quote from: Spale on March 27, 2011, 03:17:03 PM
Try to optimize your database tables via phpMyAdmin. That simple step solved my forum sluggishness.

Not recommended if you're using InnoDB tables as the person above seems to be.
Title: Re: Having a speed issue with forums
Post by: bros on April 03, 2011, 06:14:23 PM
Quote from: Spale on March 27, 2011, 03:17:03 PM
Try to optimize your database tables via phpMyAdmin. That simple step solved my forum sluggishness.

Already have done

Quote from: Arantor on March 27, 2011, 03:18:11 PM
Quote from: Spale on March 27, 2011, 03:17:03 PM
Try to optimize your database tables via phpMyAdmin. That simple step solved my forum sluggishness.

Not recommended if you're using InnoDB tables as the person above seems to be.


Not using InnoDB
Title: Re: Having a speed issue with forums
Post by: Ensiferous on April 04, 2011, 12:45:13 AM
Quote from: bros on March 23, 2011, 02:32:13 PM
Swap: 28.939% (75860k / 262136k)

Your problem is here. You've configured your server to allow it to use more memory than it has, this means it will start using swap and slow down. Most likely you've not configured your database correctly or you allow too many Apache processes. It's quite common to see people set max Apache processes waaaay too high thinking they can handle more traffic then, but in reality it will just make their server crash.