Twenty-four things you can do to make SMF go faster (Updated June 16th, 2010)

Started by Vekseid, February 16, 2009, 06:29:50 AM

Previous topic - Next topic

Arantor

It's not a case of too many, it's *why*. I see no reason why there should be a fulltext index on the IP column, yet something put it there. Trouble is, removing it might break something...

Ensiferous

Quote from: Arantor on April 20, 2011, 02:54:09 AM
Trouble is, removing it might break something...

Nah, this would be a good thing. Would show wtf is stupid enough to place a fulltext index on the ip and then you can delete it as quickly as possible and never go near it again.
My Latest Blog Post: Debugging Nginx Errors

Arantor

I'd be willing to bet it being one of the anti-spam mods that does MATCH() against the IP for comparisons.

HunterP

Quote from: Arantor on April 20, 2011, 08:44:24 AM
I'd be willing to bet it being one of the anti-spam mods that does MATCH() against the IP for comparisons.

I'm running Stop Forum Spam (as well as your Login Detector) and can't find any DB-changes in the package.

Arantor

My login mod is a grand total of two lines added to deal with a specific brute force thing. But no, SFS doesn't add it. Something did though...

xxrapxx

I Change that is.

My forum is very badly sistem.

restore please restore

Vekseid

Quote from: Forum Labs on April 19, 2011, 07:31:08 PM
is it safe to convert smf_log_digest to innodb?

Yes.

Quote
I just changed my smf_messages to innodb and my load increased from 1 to 3. Is that normal?

If your forum or forums are fairly active and get a lot of posts, this would signify they you are disk-bound for I/O, and InnoDB may be a bit too heavy for you.
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

xxrapxx

my site is crashed  >:( >:( >:( I have a backup.

How can I fix this absurd settings

Vekseid

You'll have to give us more details about your configuration, what you did, and what is going wrong.
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.


oOo--STAR--oOo

Quote from: aljo1985 on April 19, 2011, 04:57:22 PM
This tutorial helped me alot..
I have applied changes to sql to change things to innodb as stated in the 1st topic.
It does seem to of made a difference :D

uses about 300mb more ram due to the pool_limit which I set to 128 but that cool I have 4gb

I also wanna convert the rest of my forum to innodb other than those that would NOT benefit.
I do have a large amount of mods and the main ones would obviously be the portal and other mods that possibly would benefit loading times. So please can some one help me in which would improve.. I am looking at ways to improve the speed and performance of my forums when its gets busy.

Here is a list of database tables

smf_admin_info_files
smf_aeva_albums
smf_aeva_comments
smf_aeva_fields
smf_aeva_field_data
smf_aeva_files
smf_aeva_log_media
smf_aeva_log_ratings
smf_aeva_media
smf_aeva_perms
smf_aeva_quotas
smf_aeva_settings
smf_aeva_variables
smf_affiliates
smf_affiliates_banners
smf_affiliates_rating
smf_affiliate_report
smf_ajaxchat_bans
smf_ajaxchat_invitations
smf_ajaxchat_messages
smf_ajaxchat_online
smf_ajaxshout_bans
smf_ajaxshout_invitations
smf_ajaxshout_messages
smf_ajaxshout_online
smf_approval_queue
smf_arcade_categories
smf_arcade_favorite
smf_arcade_games
smf_arcade_personalbest
smf_arcade_rates
smf_arcade_scores
smf_arcade_settings
smf_arcade_shouts
smf_arcade_tournament
smf_arcade_tournament_players
smf_arcade_tournament_rounds
smf_arcade_tournament_scores
smf_arcade_v3temp
smf_attachments
smf_awards
smf_awards_categories
smf_awards_members
smf_ban_groups
smf_ban_items
smf_battle_explore
smf_battle_graveyard
smf_battle_history
smf_battle_monsters
smf_battle_quest
smf_battle_quest_hist
smf_battle_shop
smf_battle_shouts
smf_boards
smf_board_permissions
smf_buddies
smf_calendar
smf_calendar_holidays
smf_categories
smf_cf_fields
smf_cf_forms
smf_collapsed_categories
smf_custom_fields
smf_down_cat
smf_down_catperm
smf_down_comment
smf_down_creport
smf_down_custom_field
smf_down_custom_field_data
smf_down_file
smf_down_groupquota
smf_down_rating
smf_down_report
smf_down_userquota
smf_feedbot
smf_feedbot_log
smf_group_moderators
smf_helpdesk_attachments
smf_helpdesk_log_action
smf_helpdesk_log_read
smf_helpdesk_tickets
smf_helpdesk_ticket_replies
smf_links
smf_links_cat
smf_links_catperm
smf_links_rating
smf_log_actions
smf_log_activity
smf_log_banned
smf_log_boards
smf_log_comments
smf_log_digest
smf_log_enotify_pms
smf_log_enotify_replies
smf_log_errors
smf_log_floodcontrol
smf_log_group_requests
smf_log_karma
smf_log_mark_read
smf_log_member_notices
smf_log_notify
smf_log_online
smf_log_packages
smf_log_polls
smf_log_reported
smf_log_reported_comments
smf_log_rssfeeds
smf_log_scheduled_tasks
smf_log_search_messages
smf_log_search_results
smf_log_search_subjects
smf_log_search_topics
smf_log_spider_hits
smf_log_spider_stats
smf_log_subscribed
smf_log_topics
smf_log_topic_view
smf_mail_queue
smf_membergroups
smf_members
smf_member_notes
smf_messages
smf_message_icons
smf_moderators
smf_openid_assoc
smf_package_servers
smf_permissions
smf_permission_profiles
smf_personal_messages
smf_picture_comments
smf_pm_attachments
smf_pm_recipients
smf_pm_rules
smf_polls
smf_poll_choices
smf_portamx_blocks
smf_portamx_settings
smf_post_drafts
smf_pretty_topic_urls
smf_pretty_urls_cache
smf_profile_albums
smf_profile_comments
smf_profile_pictures
smf_redirect_expire
smf_rssfeeds
smf_scheduled_tasks
smf_sessions
smf_settings
smf_shop_category
smf_shop_item
smf_shop_property
smf_shop_purchHis
smf_smileys
smf_spiders
smf_subscriptions
smf_talkbox
smf_talkbox_archive
smf_talkbox_banned
smf_talkbox_media
smf_team
smf_thank_you_post
smf_themes
smf_topics


I would appreciate and help given. Thank you for this tutorial.

because Porta MX is my home page.. Would converting any of the tables to InnoDB benefit me
If so which ones.
You can't fool a sufficiently talented fool.

http://www.uniquez-home.com
In Design Phase!

Mods I am designing,  No refresh Collapse Categories , Poll Redesign , Pure CSS Breadcrumb , Profile Statuses, Profile Views.

xxrapxx


Illori

smf has no control or access to any other forum running the software, if your database has issues and a backup needs to be restored you are best to contact your host to see if they have a backup if you do not, otherwise there is nothing that can be done if you do not have a backup.

Vekseid

Quote from: aljo1985 on April 21, 2011, 12:48:53 PM
because Porta MX is my home page.. Would converting any of the tables to InnoDB benefit me
If so which ones.

All except for four
smf_log_floodcontrol (convert to MEMORY)
smf_personal_messages (best as MyISAM, set concurrent_insert=2, however)
smf_ajaxchat_messages (as with smf_personal_messages - these tables have a lot of inserts, sometimes deletes, but updates are rare)
smf_messages (unless your members edit a lot, in which case you will need to)

Everything else uses a comparatively small amount of memory, or is very update heavy, making table locks rather painful. However, because InnoDB's format is more space heavy, it can mean converting large tables to InnoDB is a problem in and of itself. Table compression helps with this if your members make large posts, however.

I'm thinking that I may even move personal_messages and my ajax_chats back to MyISAM. It would at least take some of the load off of the shared tablespace, which is a problem for me.
Adult Role Playing Forums - - Over five million posts - - Elliquiy's LAMP configuration (maybe NSFW)

Blog about Forums and Servers - - Twenty things to make Simple Machines Forum go faster

Private/Instant Message requests for free support will be ignored.

vakfikebirli

Thanks very much, many of your suggestions were missed by me and have now been implemented. Always happy to optimize in any way I can. Also looking forward to the intermediate suggestions when my forum's big enough to really need a vps or dedicated host.

Bookmarked.
.:Bilgi paylaştıkça çoğalır:.
Bürokrasi | Bilginin Adresi

TechTitan

Hi,

I'm running a site for small local non-profit organisation with small number of online users (between 15 - 50 at any given time). Since they can only afford basic shared hosting (max memory usage 384M), I have to do all sorts of optimizations to make sure SMF runs smoothly. I have done some on .htaccess level, making all images thumbnail, and now tried the InnoDB conversion as suggested here. I'm really impressed. Although the forum is quite small but the users are very active. It really improved the forum performance. I wonder if there is more to optimize..

Thank you for the optimization tips. :)
--:: .... ::--
Checkin' SMF from time to time

008Rohit

Quote from: TechTitan on April 24, 2011, 01:07:02 AM
Hi,

I'm running a site for small local non-profit organisation with small number of online users (between 15 - 50 at any given time). Since they can only afford basic shared hosting (max memory usage 384M), I have to do all sorts of optimizations to make sure SMF runs smoothly. I have done some on .htaccess level, making all images thumbnail, and now tried the InnoDB conversion as suggested here. I'm really impressed. Although the forum is quite small but the users are very active. It really improved the forum performance. I wonder if there is more to optimize..

Thank you for the optimization tips. :)
The biggest thing what you should do is to change the Uploaded Avatars directory. Default is /avatars/ change it to something like /avtrs/ , I mean create a new folder with that name. And thats gonna improve the performance of your forum. :)
BTW, May I know who is your host?  :)
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

TechTitan

Quote from: 008Rohit on April 24, 2011, 05:39:28 AM
Quote from: TechTitan on April 24, 2011, 01:07:02 AM
Hi,

I'm running a site for small local non-profit organisation with small number of online users (between 15 - 50 at any given time). Since they can only afford basic shared hosting (max memory usage 384M), I have to do all sorts of optimizations to make sure SMF runs smoothly. I have done some on .htaccess level, making all images thumbnail, and now tried the InnoDB conversion as suggested here. I'm really impressed. Although the forum is quite small but the users are very active. It really improved the forum performance. I wonder if there is more to optimize..

Thank you for the optimization tips. :)
The biggest thing what you should do is to change the Uploaded Avatars directory. Default is /avatars/ change it to something like /avtrs/ , I mean create a new folder with that name. And thats gonna improve the performance of your forum. :)
BTW, May I know who is your host?  :)

Many thanks for your reply...
I already did that before I read this thread. Found it somewhere outside SMF Community Forum. Yes, it really improved overall forum performance...

I'm using local provider called Exabytes (for faster local traffic).

I do understand at point or another, as the usage increases, upgrade to VPS can not be avoided. But at least, I'm having fun trying to extract maximum performance out of a simple shared hosting account...  :) (It has been a while since I last touch SMF)

I hope no one here is going to scold me if I list what I did (or wrongly did with no significant performance boost)  8)

a. I use mod_deflate/mod_gzip in .htaccess
b. Enable some browser caching stuff in .htaccess
c. Enable in php.ini output_buffering = On, output_handler = ob_gzhandler, zlib.output_compression = Off
d. Change user avatar directory
e. Disable attachment (don't see the need to have it enabled, use Aeva Media)
f.  Use GD2 (or is it ImageMagick is better?) for Aeva Media
g. Set embedded Aeva Media image in post to display thumbnail
h. In SMF Features and Options -> Layout -> Set maximum width & height of posted image same as Aeva Media thumbnail size (for consistency)
i. Disable SMF compressed output, evalution of templates & hostname lookup (since i do it in .htaccess)
j. Enable database driven session
k. rewrite the URL in .htaccess (i think no boost here)
l. Use optimal number of mods.
m. Convert some recommended tables to InnoDB

At the beginning the forum always reached the maximum memory limit, but after doing above, it now only happens occasionally...(well it is at the end of the day still a shared hosting)
--:: .... ::--
Checkin' SMF from time to time

008Rohit

Quote from: TechTitan on April 24, 2011, 07:33:38 AM
Quote from: 008Rohit on April 24, 2011, 05:39:28 AM
Quote from: TechTitan on April 24, 2011, 01:07:02 AM
Hi,

I'm running a site for small local non-profit organisation with small number of online users (between 15 - 50 at any given time). Since they can only afford basic shared hosting (max memory usage 384M), I have to do all sorts of optimizations to make sure SMF runs smoothly. I have done some on .htaccess level, making all images thumbnail, and now tried the InnoDB conversion as suggested here. I'm really impressed. Although the forum is quite small but the users are very active. It really improved the forum performance. I wonder if there is more to optimize..

Thank you for the optimization tips. :)
The biggest thing what you should do is to change the Uploaded Avatars directory. Default is /avatars/ change it to something like /avtrs/ , I mean create a new folder with that name. And thats gonna improve the performance of your forum. :)
BTW, May I know who is your host?  :)

Many thanks for your reply...
I already did that before I read this thread. Found it somewhere outside SMF Community Forum. Yes, it really improved overall forum performance...

I'm using local provider called Exabytes (for faster local traffic).

I do understand at point or another, as the usage increases, upgrade to VPS can not be avoided. But at least, I'm having fun trying to extract maximum performance out of a simple shared hosting account...  :) (It has been a while since I last touch SMF)

I hope no one here is going to scold me if I list what I did (or wrongly did with no significant performance boost)  8)

a. I use mod_deflate/mod_gzip in .htaccess
b. Enable some browser caching stuff in .htaccess
c. Enable in php.ini output_buffering = On, output_handler = ob_gzhandler, zlib.output_compression = Off
d. Change user avatar directory
e. Disable attachment (don't see the need to have it enabled, use Aeva Media)
f.  Use GD2 (or is it ImageMagick is better?) for Aeva Media
g. Set embedded Aeva Media image in post to display thumbnail
h. In SMF Features and Options -> Layout -> Set maximum width & height of posted image same as Aeva Media thumbnail size (for consistency)
i. Disable SMF compressed output, evalution of templates & hostname lookup (since i do it in .htaccess)
j. Enable database driven session
k. rewrite the URL in .htaccess (i think no boost here)
l. Use optimal number of mods.
m. Convert some recommended tables to InnoDB

At the beginning the forum always reached the maximum memory limit, but after doing above, it now only happens occasionally...(well it is at the end of the day still a shared hosting)
Well, if your host provides "unlimited everything" like me host iPage does, then you can waste their resources by enabling attachments and increasing max_uploaded_file_size in php.ini to over 10M. :P
BTW, I'm eager to know how can you enable gzip compression from .htaccess? I enabled some zlib compression from php.ini which was disabled by default. :)
and My host doesnt even support InnoDB tables. :(
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

TechTitan

Quote from: 008Rohit on April 24, 2011, 09:26:10 AM
Well, if your host provides "unlimited everything" like me host iPage does, then you can waste their resources by enabling attachments and increasing max_uploaded_file_size in php.ini to over 10M. :P
BTW, I'm eager to know how can you enable gzip compression from .htaccess? I enabled some zlib compression from php.ini which was disabled by default. :)
and My host doesnt even support InnoDB tables. :(

My upload_max_filesize is already set at 20MB. There are certain php parameters I can change via local php.ini and upload_max_filesize is not one of it (provider locked). My understanding about SMF isn't that good, but I think the way it handle attachments will create unwanted stress to the hosting account.

I have zlib.output compression=Off in php.ini since I use output_buffering = On, output_handler = ob_gzhandler, this is because i think SMF uses gzhandler in their ob_start(). The gzhandler compresses the php files and mod_deflate in .htaccess the rest.

Did you check what you have through phpinfo() ?
--:: .... ::--
Checkin' SMF from time to time

Advertisement: