SmarterTools Portal Language
 
HomeKnowledge BaseSmarterStatsHow To - Instructing SmarterStats to use more CPU when processing
Information
Article ID220
Created On4/30/2008
Modified9/11/2008
Share With Others
How To - Instructing SmarterStats to use more CPU when processing

Applies to: SmarterStats (all versions)

SmarterStats is primarily intended to be a low-impact service on a server, allowing you to run it side-by-side on the same server as your web sites without it taking too many resources.

If the server is dedicated to processing stats, however, you can increase the amount of CPU that stats uses to process stats to speed things up quite a bit over the default install.  To this end, several parameter can be set on the Service Settings configuration page.

In most cases, this is a good change to make if your server is primarily intended for stats processing:

  • Log in as the admin (site ID "admin") 
  • Go to Settings -> Service Settings
  • Change reader time slice to 60.
  • Change Rows before sleep to 200
  • Change row sleep time to 0

Doing these steps will make stats run a LOT faster on large sites.  If it's taking too much CPU, change row sleep time to 1 and rows before sleep up to 1000 or so.  Tweak as necessary.  The fields have the following meaning:

Reader Time Slice is how long each site will process before moving to another site.  Since, starting up and stopping processing on larger sites is resource intensive, increasing this time will make your system import faster if you have very large sites (> 2 GB total logs)

Rows Before Sleep is how many rows or data records will be processed before sleeping the amount of milliseconds in Row Sleep Time.  Therefore, increasing this value will make more rows process before sleeping to give the CPU a chance to process other tasks, making it faster.

It is not recommended to set Row Sleep Time to any value besides 0 or 1.  A value of 1 will import fairly slow, but impact CPU VERY little on a server.