Advertisement:

Author Topic: Twenty-four things you can do to make SMF go faster (Updated June 16th, 2010)  (Read 565404 times)

Offline amlucent

  • Jr. Member
  • **
  • Posts: 147
  • Gender: Male
    • The Good Old Days Guild
Thanks Phalloidium!  at least I know where to look for these options now.

btw I am going to try iweb based on your recommendation.. it cant be worse than bluehost.

Offline Something like that

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,496
  • Gender: Male
  • ]
I'm very happy with them. They're excellent to deal with on all levels. I haven't tried their shared hosting, but their dedicated service is awesome.

Offline exxocet

  • Jr. Member
  • **
  • Posts: 121
My own experience, don't set to InnoDB your smf_log_search_words (if you're using Custom Index, of course). Indexing won't be done properly under InnoDB.

At least that's my case, don't know if it's just me, but I doubt.
« Last Edit: March 17, 2009, 01:05:35 PM by exxocet »

Offline Something like that

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,496
  • Gender: Male
  • ]
Interesting. I gave up on a custom index and went to Sphinx.
« Last Edit: March 25, 2009, 02:19:57 PM by Phalloidium »

Offline mariafgp

  • Semi-Newbie
  • *
  • Posts: 26
  • Gender: Female
    • Date Site Forums
7: Disable the recent posts feature on the board index. Let people click a link if they want to see more than the last post they have access to, compiling that list is expensive especially if you have a lot of groups set up. Also I find it rather ugly, myself.

I have been looking for the place to change this and can't find it. Are you talking about the Forum Stats box? Is there a way to remove that?

Offline Vekseid

  • Full Member
  • ***
  • Posts: 548
  • Gender: Male
    • Elliquiy Adult Role Playing Forums
Edited, it is in your theme's settings - just set it to zero to disable it : )
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.

Offline Something like that

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,496
  • Gender: Male
  • ]
7: Disable the recent posts feature on the board index. Let people click a link if they want to see more than the last post they have access to, compiling that list is expensive especially if you have a lot of groups set up. Also I find it rather ugly, myself.

I have been looking for the place to change this and can't find it. Are you talking about the Forum Stats box? Is there a way to remove that?

If you do most of the other things in the list, the Recent Posts feature is very quick. I know a lot of my members use it all day long.

Offline Vekseid

  • Full Member
  • ***
  • Posts: 548
  • Gender: Male
    • Elliquiy Adult Role Playing Forums
This isn't disabling the recent posts feature itself, but rather the part on the index.
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.

Offline mweed

  • Semi-Newbie
  • *
  • Posts: 13
On #1 Move your uploaded avatars directory

When I go to index.php?action=manageattachments;sa=moveAvatars, it keeps redirecting me to the action=manageattachments;sa=maintenance page.

When I look at the code in the ManageAttachments.php file, the last line of the funtion reads:
Code: [Select]
if (!empty($updatedAvatars))
db_query("
UPDATE {$db_prefix}attachments
SET attachmentType = 1
WHERE ID_ATTACH IN (" . implode(', ', $updatedAvatars) . ')', __FILE__, __LINE__);

redirectexit('action=manageattachments;sa=maintenance');

Other code in the function gives an error message if the new directory isn't writable.   I'm not getting any error.
Which implies to me, that the db query is not finding any avatars to move.  But the File Maintenance page lists 149 avatars in the attachments directory.

Any suggestions?

Offline Dzonny

  • Localizer
  • SMF Super Hero
  • *
  • Posts: 11,923
  • Gender: Male
  • No sleep...
    • dzontra.nikola on Facebook
    • Dzonny on GitHub
    • dzontranikola on LinkedIn
    • @opusteniforum on Twitter
    • Samo opusteno
great tips, thanks... :)

Offline Vekseid

  • Full Member
  • ***
  • Posts: 548
  • Gender: Male
    • Elliquiy Adult Role Playing Forums
Other code in the function gives an error message if the new directory isn't writable.   I'm not getting any error.
Which implies to me, that the db query is not finding any avatars to move.  But the File Maintenance page lists 149 avatars in the attachments directory.

Any suggestions?

They're still considered to be attachments, even if they are only in your specified avatar upload directory.
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.

Offline mweed

  • Semi-Newbie
  • *
  • Posts: 13
Yes, they are still attachments, but when I access the page that is supposed to move them from the standard attachment directory to my new avatar directory, it does not move them, it jumps straight to the redirect page.  So, even though I have followed the directions in suggestion #1, I get no benefit because nothing is moved.

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Quote
E: run crontab -e and add this line:
35  4  *   *   *     /home/userdir/scripts/backup.smf

now i need some clarification on this, i have attached how my cron job center looks,

now my Q is, should i just put in the url of the script  in the run area ?

and set run time below ?

Offline Vekseid

  • Full Member
  • ***
  • Posts: 548
  • Gender: Male
    • Elliquiy Adult Role Playing Forums
Command to run would simply be the path to and name of your script - it would not be a url.

Just highlight the equivalent runtime - minute 35, hour 4, every day, every month, every weekday. Or whenever you wish to run it.

Yes, they are still attachments, but when I access the page that is supposed to move them from the standard attachment directory to my new avatar directory, it does not move them, it jumps straight to the redirect page.  So, even though I have followed the directions in suggestion #1, I get no benefit because nothing is moved.

Err, sorry. I know this command basically only works once - I'd need to have/see more details : /
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.

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Yes, they are still attachments, but when I access the page that is supposed to move them from the standard attachment directory to my new avatar directory, it does not move them, it jumps straight to the redirect page.  So, even though I have followed the directions in suggestion #1, I get no benefit because nothing is moved.

i used this step as well, and also got redirected, to att mgmt page , but it moved the files to the new folder properly, and no issues wid the function as well,

chk your dir if the movement has taken place( new one)

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
and thanks vek, i did it , it worked well thanks for the tips, i am hoping u ll give some more

Offline Simple Lion

  • Semi-Newbie
  • *
  • Posts: 13
Good Post  8)

Offline Vekseid

  • Full Member
  • ***
  • Posts: 548
  • Gender: Male
    • Elliquiy Adult Role Playing Forums
Added a couple more, about controlling mod_expires and scheduled tasks in SMF 2.0
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.

Offline Joshua Dickerson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,777
  • Gender: Male
    • joshuaadickerson on GitHub
    • joshuaadickerson on LinkedIn
Don't truncate your log tables. All of your posts will appear to be unread. One of the best features of SMF is being able to see what you've read no matter how old. Next, not all of those tables will benefit from InnoDB. In fact, some might be worse of as it.

Some of these changes I have been pushing for since before SMF was released. Then there are those things which make a huge difference - turn on caching, enable an opcode cache, drop the mods that you installed because someone, at some point, might be interested in using them.

Also, note that for 99% of forums out there, most of these recommendations are moot. Either the performance gains are minimal (possibly even negative) or they won't affect the overall performance of their hosts' server.

If you are running on a shared host and you are trying to squeeze out fractional gains from SMF, you are looking in the wrong place. Your host probably has more cause to your site running slow than SMF. Don't get me wrong with that, SMF can be slow, but it is the highest level in a pyramid of performance concerns.
Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Offline Something like that

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,496
  • Gender: Male
  • ]
Here's a way to speed up stats in SMF 1.1: http://www.simplemachines.org/community/index.php?topic=289961.0