Dashboard CPU Intensive

Options
miguel_hughes
edited July 2012 in Photon Server
Hi guys. I'm setting up the dashboard on our dev server and i'm seeing the following problem: it hogs all of the cpu power! Granted that the server is not very powerful, but on my laptop the cpu usage hasn't changed since I turned it on. I'm using the same settings on both.
Do I need to reduce the refresh rate, or is there another approach to take? Is there any reason you can think of which would make the server behave so differently as my laptop?
Some stats: Photonsocketserver, which hosts the counterpublisher application, is at 5% cpu usage. rrdtool is at 20% and photondashboard is at 50%.

Thanks

Comments

  • Hi, we are aware that the dashboard service sometimes causes high CPU usage.
    This is usually caused by the part of the service that renders the images, so if you have any problems, it's a good idea to reduce the ImageUpdateInterval (the setting is in seconds, so maybe change it to 30 or 60 seconds).
    You could also review the Graphs.xml file and remove some image definitions, in case you are not interested in all of the generated graphs.
    In any case, if CPU usage is high, a service restart usually helps - but I'm aware that this is not a desired solution. ;)

    We have some ideas how to improve the dashboard service, but I can't promise that we can do it in the near future. Sorry! Hope you can get it to work anyways... and let me know if you still have trouble.
  • Thanks Nicole
    I reduced the ImageUpdateInterval setting of the service to 1 minute and also reduced updateInterval and publishInterval from counter publisher a bit. It's working much better now, thanks!
  • BTW Nicole, do you know how the <archives> section of the dashboard configuration is operated? I'm looking for something exactly like that (historic data of counters), but I can't find the graphs anywhere. I haven't modified that section of the configuration:

    <rrdSettings basePath="PerfData">
    <dataSources>
    <add name="GAUGE" type="GAUGE" heartbeat="5"/>
    <add name="COUNTER" type="COUNTER" heartbeat="5"/>
    </dataSources>
    <archives>
    <!-- one second step for one hour (3600 seconds)-->
    <add name="Hours" function="AVERAGE" steps="1" rows="3600"/>
    <!-- one minute steps for the last day (1140 minutes)-->
    <add name="Day" function="AVERAGE" steps="60" rows="1440"/>
    <!-- 5 minute interval for the last week -->
    <add name="Week" function="AVERAGE" steps="300" rows="2016"/>
    </archives>
    </rrdSettings>

    I can't find any documentation on it either, is it operational?
  • My thoughts on the dashboard: although it's really nice & extensible and has pretty graphs. It's kinda of retro to have the server do all that work. Now there is a photon javascript websockets/html5 client, why not just publish stats on a websockets client, and let the client track the statistics and do the graphing? For example I would use http://d3js.org
    My only question is could some of the OS-level counters like memory usage and cpu usage be gotten from .NET land? i.e. could I write something like this, or would ExitGames have to write a custom server app?
  • Tobias
    Options
    There is a CounterPublisher application that captures Photon Core's counters and publishes them to DotNet land and the Counter Service (which is gathering and persisting the counters and could run independently from Photon).
    So, the main remaining task to use browser based graph rendering is getting the data from the RRD database in chunks.
    I'm not sure if there isn't already some way to get them. That should be in the counter service.