FlexHub Forum

Tech talk - cpu usage analysis

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Tech talk - cpu usage analysis
« on: June 11, 2010, 17:19:16 »
Some time ago I did some timing profiling on Flexhub and made an analysis of the resulting data.
Meanwhile some improvements have been made based on this analysis, so it's not very accurate anymore, but might be interesting to look a bit behind the scenes for the geeks among us.

At the moment there are a lot of os.clock() calls in the code to provide timing info in the hub for the !coreinfo command, this is for debugging purposes. After beta these os.clock() calls will be dramatically reduced.

Here's the graph with the summary, or click http://www.flexhub.org/images/Flexhub-CPU.jpg for the big version:



Ofcourse any comments or critics are welcome!
« Last Edit: June 11, 2010, 17:34:23 by FlipFlop™ »
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline TraN

Re: Tech talk - cpu usage analysis
« Reply #1 on: June 20, 2010, 16:21:23 »
the biggest part is waiting, thats good  :)
what part is the one involving os.clock()? the one called "clock"?

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Tech talk - cpu usage analysis
« Reply #2 on: June 20, 2010, 20:01:10 »
Yep, so it takes quite a large bit of the total processing time now, about 1% of the total 15% that the application takes cpu-time, so theoretically reducing the timings for gathering statistics on operations can  increase the hubs performance up to around 8%.
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Re: Tech talk - cpu usage analysis
« Reply #3 on: May 26, 2011, 10:16:07 »
Some profiling has now been done on FlexHub svn 1075, we think there's still quite some room for improvement, which will mean the hub will run with less cpu usage, and a higher max usercount is possible. Currently max usercount is around 1500, if the system has a decent cpu.

Click the links to see the full resolution images.

http://flexhub.org/images/Flexhub-Profiling-cpu-60logins.jpg



http://flexhub.org/images/Flexhub-Profiling-calls-60logins.jpg
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.