Search Unity

Highcpu on windows server 2012

Discussion in 'Windows' started by PauloEgidio, Oct 9, 2017.

  1. PauloEgidio

    PauloEgidio

    Joined:
    Jul 19, 2017
    Posts:
    12
    Hello. I've made a simple standalone server which consumes about 1-3% cpu on my 7700HQ notebook.

    when I run this on my dedicated server (which I can access only using remote desktop), it reaches 85% of it's 12 cpus!

    I tried to destroy all the things there were needed on server, and it reduced to about 55%...

    But it's still too much.

    Any ideas?

    Paulo
     
  2. PauloEgidio

    PauloEgidio

    Joined:
    Jul 19, 2017
    Posts:
    12
    One of the things I did was delete the camera and all gui objects. this is confirmed when running insde the editor.

    I tried the code below, but it did nothing, so it seems that the problem is not at the main thread....

    void Update() {
    if (servermode) {
    if (Link.links.Count == 0)
    System.Threading.Thread.Sleep (1000);
    return;
    }
     
  3. PauloEgidio

    PauloEgidio

    Joined:
    Jul 19, 2017
    Posts:
    12
    Link.links.Count == 0 indicates that there are no current server objects, sorry :)
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Did you try profiling the build to see where it's spending its time at?
     
  5. PauloEgidio

    PauloEgidio

    Joined:
    Jul 19, 2017
    Posts:
    12
    Good idea... I will try that and post here.

    Thanks!
    Paulo