Author Topic: Linux server uses all the CPU  (Read 2911 times)

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Linux server uses all the CPU
« on: October 25, 2010, 11:53:52 pm »
I've tried to launch the server on linux (Debian) but it consumes all the CPU. What am I doing wrong or what am I missing?


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

Windlord

  • Guest
Re: Linux server uses all the CPU
« Reply #1 on: October 26, 2010, 02:48:47 am »
The server I host has been running for 3 and a half hours using barely any resources.
(Running on a Debian dedi)

Check the scripts and modules you have loaded.

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Re: Linux server uses all the CPU
« Reply #2 on: October 26, 2010, 03:47:39 pm »
I have no modules neither scripts loaded. There are just the files I downloaded with the server, with modified config of course. Perhaps it has to do something with the fact my server is 64bit?


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Re: Linux server uses all the CPU
« Reply #3 on: February 20, 2012, 09:07:19 pm »
Hi, so I've tried to launch my server again and I still have the same problem. I'm trying to run the server on Debian VPS 32bit, I have 3x2400 Mhz CPU and the server consumes 100% of all CPUs causing server load going over 20.

I've deleted all scripts and modules, so there is running only the empty server.

Please someone help me! I'd like to run the LU server finally. Thanks in advance for any help.

htop:



server.conf:

Quote
server_name [CZ/EN] GTA-Multiplayer.cz
listen_port 2301
max_players 50
password none
owner GTA-Multiplayer.cz
website http://www.gta-multiplayer.cz
gamemode_name Deathmatch
announce yes

rcon 0

sync_radius 300
sync_min_interval 500
sync_full_interval 40

game 1

weatherlock on
weather 0

islands 3

pickup_respawn_time 60
« Last Edit: February 20, 2012, 09:58:06 pm by niCe »


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

VetalYA

  • Guest
Re: Linux server uses all the CPU
« Reply #4 on: February 20, 2012, 10:00:50 pm »
Hi. I use other Linux distro and i've noticed such problem happen - when in File manager i click with mouse on Server.bin

Do you launch your server via SSH ?

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Re: Linux server uses all the CPU
« Reply #5 on: February 20, 2012, 10:51:01 pm »
Yes, I'm launching it with Putty.

I use "nohup ./Server.bin &" command to launch the server, I can see it in the client and connect to the server, but the CPU usage is 100%. However when I run the server only with "./Server.bin &", the cpu usage is 0, but I see the server as offline and I can't also connect to it.
« Last Edit: February 20, 2012, 10:59:41 pm by niCe »


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

VetalYA

  • Guest
Re: Linux server uses all the CPU
« Reply #6 on: February 21, 2012, 12:05:43 am »
Well, now i launched my Linux & connected to my localhost SSH  (everything under root)

When i launched via SSH default linux server with:
Code: [Select]
/VetalYA/Server.bin & Server starts to use about 3 Mb of RAM & about 70 % of CPU.

But when i launched
Code: [Select]
/VetalYA/Server.bin Server starts use  about 3 Mb of RAM and about 0~1 of CPU.

You see,  LU Server is independent application, and  he don't like being launched with command line parameters.

So try to launch with "nohup ./Server.bin"

Good luck.  ;)

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Re: Linux server uses all the CPU
« Reply #7 on: February 21, 2012, 12:14:15 am »
Thanks for your advice, however, it still uses 70-110% of CPU. I've tried all combinations with "nohup" and "&" and only "./Server.bin &" and "./Server.bin" don't overload the cpu, so it looks like the problem is in nohup. And also I can't connect to server when it's launched with "&" parameter.

Thus "./Server.bin" is the only remedy. But how to keep the process running once the Putty closes the session?
« Last Edit: February 21, 2012, 01:17:36 am by niCe »


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Linux server uses all the CPU
« Reply #8 on: February 21, 2012, 12:41:28 pm »
Try running it trough "screen"

niCe

  • Newbie
  • *
  • Posts: 42
  • Karma: +7/-5
    • View Profile
    • GTA-Multiplayer.cz
Re: Linux server uses all the CPU
« Reply #9 on: February 22, 2012, 09:26:20 am »
Thanks, I'll try it. I hope there is any chance this will be fixed in any of the future server updates.


GTA-Multiplayer.cz - game servers for SA-MP, VC:MP, IV-MP and Liberty Unleashed.

play.gta-multiplayer.cz:2301

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Linux server uses all the CPU
« Reply #10 on: February 22, 2012, 11:11:56 pm »
Moved to bug reports.

 

© Liberty Unleashed Team.