Author Topic: [fixed] headless server: 100% cpu load on map load  (Read 925 times)

treba

  • Guest
[fixed] headless server: 100% cpu load on map load
« on: 13 November 2011, 21:47:39 »
my dedicated server is at 100% cpu load during map load until all clients have finished loading.
as i have a really slow computer, it takes much longer if i'm in the game, compared to a game with fast clients. but in both cases, the server is under heavy load during the loading process.

after the game starts, it's all fine.

actually, that's all not much of a problem, but if we want to run multiple servers on one system, it would make running games choppy.

the server is a vps with a 3ghz qemu cpu
« Last Edit: 19 November 2011, 00:16:21 by softcoder »

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: headless server: 100% cpu load on map load
« Reply #1 on: 14 November 2011, 02:39:41 »
Which version or revision is this report about exactly? Thanks.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: headless server: 100% cpu load on map load
« Reply #2 on: 14 November 2011, 05:19:18 »
Try svn rev 2801 to see if this is resolved

treba

  • Guest
Re: headless server: 100% cpu load on map load
« Reply #3 on: 15 November 2011, 15:52:15 »
actually it's better now, but not really resolved as it's still at around 80% cpu load. maybe somebody else can reproduce this with another maschine?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: headless server: 100% cpu load on map load
« Reply #4 on: 15 November 2011, 16:05:01 »
This occurs only during load (while waiting for players) right?

treba

  • Guest
Re: headless server: 100% cpu load on map load
« Reply #5 on: 15 November 2011, 16:19:33 »
yep

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: headless server: 100% cpu load on map load
« Reply #6 on: 15 November 2011, 16:44:26 »
svn rev# 2812 introduces the following:

Server host:

Code: [Select]
NetworkServerLoopGameLoadingCap=100
NetworkServerLoopGameLoadingCapSleepMillis=1

Clients:

Code: [Select]
NetworkClientLoopGameLoadingCap=100
NetworkClientLoopGameLoadingCapSleepMillis=1

These are hard coded defaults and are not in glestuser.ini by default. You may override them by adding the entries and tweaking the values.

The first cap entry is # of loops waiting for the game to start before we let the CPU rest (sleep). The second is the # of milliseconds to sleep.

Previously the values were hard coded at 300 and 1 (now they are 100 and 1 and overridable)

treba

  • Guest
Re: headless server: 100% cpu load on map load
« Reply #7 on: 15 November 2011, 19:45:44 »
just tested it. with standard values, it took a little bit less but still much.

than i tested it with 10/10 and it was much better. is there any disadvantage with that values?

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: headless server: 100% cpu load on map load
« Reply #8 on: 15 November 2011, 22:06:47 »
just response time for game ready, and in the case of 10/10 its check every 10 loops for game ready and sleeping 10 milliseconds, which doesn't seem harmful to me. I'll change the defaults to 10/10 at least for the host.