Here are some tips for improving Sharetronix performance and speed.

1. Upgrade your Sharetronix version regularly.


Our team is working hard every day to improve Sharetronix and we strongly recommend to upgrade your installation regularly. Since version 1.4.1 you are able to upgrade it without overwriting everything and running the install script - there is a list of changed files which you can overwrite manually. Get the latest Sharetronix version from here: http://sharetronix.com/opensource/download

2. Set fast caching mechanism

Sharetronix stores a lot of data into a cache for faster access. This cache can be stored on the filesystem or in the database, but it's highly recommended to store it into the server's operating memory (RAM). This can be done in two ways, but you will need a root access to the server. The first way is the Memcached caching system which can be implemented in PHP with the Memcache or Memcached extensions. The second way is the APC (Alternative PHP cache) extension. If you install one of them, you should set the variable $C->CACHE_MECHANISM in the Sharetronix configuration file - ./system/conf_main.php.
 
3. Install eAccelerator on your server

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator  typically reduces server load and increases the speed of your PHP code by 1-10 times. You can find more information here: http://eaccelerator.net

4. Set a cronjob for Sharetronix on your server


Sharetronix needs some scripts to be ran in background periodically. This can be done very well with Cronjobs, but the problem is that most of the hosting providers don't support cronjobs. So Sharetronix uses very ugly alternative which can cause slow page load sometimes. If your server supports cronjobs, you can fix this by setting the following cronjob to run every minute with the linux crontab command:
* * * * *  /path/to/your/cli/php /path/to/your/sharetronix/system/cronjobs/worker.php

5. Use ImageMagick for image processing

By default Sharetronix uses PHP's GD extension for processing images, which is not good enough. If there is ImageMagick installed on your server (or you have root access and can install it), it's recommended to use its command line tools for image processing. In the Sharetronix configuration file (./system/conf_main.php) you need to set the variable $C->IMAGE_MANIPULATION to "imagemagick_cli" and the variable $C->IM_CONVERT to the path to the Convert program (usully /usr/bin/convert).

6. Set the RPC servers which Sharetronix pings on each new post

By default on each new post Sharetronix pings the rpc.pingomatic.com RPC server so the post can be indexed faster by Google and other search engines. You can specify more than one RPC servers, but it can cause delays. Important: if your Sharetronix installation is behind-the-firewall (not public) or you just don't want to ping these servers, disable this functionality in ./system/conf_main.php - set $C->RPC_PINGS_ON to FALSE.
  1. Anonymous
    MarcosBL Already done all but point 4, just done. Could it be possible a configuration variable in settings to deactivate the "pseudocron" for users that already have cron set up ? :-)
    on 10 May 2010
    • Anonymous
      Dave Taylor I am new at crons, could someone show me an example of a working sharetronix cron being utilized on a linux server with cpanel?

      I am also confused of what path i would use in the path area of the cron example and what goes in the shartronix spot?
      on 06 Jun 2010
  2. Nikola Pavlov In the next version if you setup a normal cronjob the "pseudocron" will die automatically :)
    on 10 May 2010
  3. Anonymous
    MarcosBL But even if it "doesn't do anything", the hit call will be made the same, and the calls to cache/Db to check for last cron run will still be made. Couldn't it be to not even do those calls/db/cache queries if i set a C->pseudocron=false; or something like that, to improve a bit the performance ? :)

    Also Nick, have you seen the MySQL / indexes improvements posted in Sharetronix Demo by alien ? Seem a good step forward too :D

    I'm also in the process of writing a Sphinx function for Sharetronix search, because in a big network, doing the searches with LIKE operators will kill any server you could dream of, and Sphinx/Lucene is the right tool there imho :D If i code it, and make a step-by-step tutorial, could this be added as an option in Sharetronix ? I would like to help with this, but haven't the time to maintain a "separate branch" :D
    on 10 May 2010
  4. Nikola Pavlov You're right about the need of pseudocron configuration variable.

    Can you send me a link to these indexes improvements? I haven't seen them.

    It would be great to have a Sphinx search alternative :)
    on 10 May 2010
  5. Anonymous
    MarcosBL Some indexes/queries modifications made by user "alien", most even with explain:

    http://sharetronix.com/opensource/demo/view/post:1359664
    http://sharetronix.com/opensource/demo/view/post:1359883
    http://sharetronix.com/opensource/demo/view/post:1357701
    http://sharetronix.com/opensource/demo/view/post:1357361
    http://sharetronix.com/opensource/demo/view/post:1353007
    http://sharetronix.com/opensource/demo/view/post:1356319
    http://sharetronix.com/opensource/demo/view/post:1356118

    JS Optimization (have tought about using jquery ? you can even use Google Free CDN for it):
    http://sharetronix.com/opensource/demo/view/post:1348661

    Support for rtube:
    http://sharetronix.com/opensource/demo/view/post:1359892

    Semi-Support for Facebook videos:
    http://sharetronix.com/opensource/demo/view/post:1363191

    Updated "ru" localization:
    http://sharetronix.com/opensource/demo/view/post:1358851

    Still waiting, when you have the time, for you permission for sourceforge group joining, it could be great to have some way of communication for developing the Sphinx mod (not too hard anyway, i have already 3 websites in production fully sphinx-driven) :)
    on 10 May 2010
  6. Anonymous
    MarcosBL Almost forgot... i'm already testing / developing a class to interact with Redis. Redis is a persistent, incredible fast NoSQL database with almost zero-configuration needed and an installation easy as 1,2,3

    It could empower a lot the system (they even have a Redis twitter clone as a sample in their website), but even if not used more, at least it will do a killer-improvement used as a new alternative Cache system, like memcached or APC, just one more, Redis. If you are interested, i could take hands on it too.

    Best regards !

    MarcosBL
    on 10 May 2010
  7. Anonymous
    alien I hope my "optimization" will be usefull ;)
    on 10 May 2010
  8. Nikola Pavlov You're the man :)

    Btw, the Sharetronix source code in SourceForge is public, I think you don't need special write permissions. Only the content inside the Branches folder is locked.
    on 11 May 2010
  9. Anonymous
    MarcosBL Not sure about that (never used SVN before), but it seems i can't commit any change, not even in the contrib folder, if i'm not added to the developers. Could you check that when you have time ?

    Commit failed (details follow):
    Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
    request for '/svnroot/sharetronix/!svn/act/30f9e783-f9c9-8f4e-b57e-f4439d8a8e42'
    on 11 May 2010
  10. Nikola Pavlov I think you need to use the username "sharetronix" and no password when you connect to the repository.
    on 11 May 2010
  11. Anonymous
    MarcosBL Already tried, same thing, and it doesn't make too much sense... you should use your SourceForge user&pass to identify who-updates-what.

    You can SVN Update (download) with no user or password, but i think you need to be added to the project with permissions (can be of course limited) in order to be able to send changes (Commit).
    on 11 May 2010
  12. Nikola Pavlov Ok, send me your SourceForge username :)
    on 11 May 2010
  13. Anonymous
    MarcosBL marcosblakb <- That's it :) Thank you !
    on 11 May 2010
  14. Anonymous
    Radu Hi! how can activate this option; facelive.net/username to username.facelive.net bicose dont work normal
    on 30 Jun 2010
  15. Anonymous
    yusuf I've downloaded the files in the facebook and twitter api to do the settings file.
    file : /system/conf_main.php
    on 30 Jun 2010
Post comment ...
You are not logged in. Do you wish to post an anonymous comment? Login
*
* E-mail address will not be published
* URL address starting with http://
Incorrect characters
Please type in the digits from the image
Comment content cannot be empty.