NPCs cause lags on linux server
#1

Hello, I've finally find out what has been causing lags on my server, it's NPCs.

When I have 0 NPCs connected to server, server load is 0-1 and server ticks in GetNetworkStats() are 160-180.
With 20 NPCs, load is 0-2 but server ticks are only 100-140
With 50 NPCs, load is 1-5, and server ticks are now 20-100, which cause huge lag spikes on server.
The default server ticks should be 200.

Is there anything I might be doing wrong? The server has 200 player slots and is running on Debian 6 32bit, CPU is 3x2100 Mhz and RAM 2048 MB so I guess HW is okay for this server. This has been tested with grand larceny gamemode with 0 players connected and there was no code in npc scripts. When I test this on my PC with Win7 and 2x2.56Ghz CPU no lags appear.

Please help! Thanks in advance.
Reply
#2

So, anyone ever had this problem? Can anyone please at least confirm you are running more than 50 NPCs on your linux server with no sign of lagging?
Reply
#3

Easiest solution: Remove NPCs

I have never had this problem... although I only use 2 NPCs in my server. You can always try contacting your Hosting service's support, they might be able to help you out more, or you can try reducing your NPC script size if that does anything, I'm not sure...
Reply
#4

Why remove then, if this problem can be fixed? thats like saying "Your heart is causing lag! REMOVE IT!"
Reply
#5

I've already emailed hosting support, they replied everything seems to be all right with the VPS. So I guess this problem will be more sa-mp related, something that causes sa-mp server and npc processes can't run properly on debian. But what could be it?

I guess there are servers with more than 20 NPCs and have no problems at all. So I'd really like to know what could be a remedy for this.
Reply
#6

Quote:
Originally Posted by Porsche911
View Post
Why remove then, if this problem can be fixed? thats like saying "Your heart is causing lag! REMOVE IT!"
Why remove them?
- Well if it bothers you so much that they make your server lagg, remove them, not forever, just temporarily.

This problem can be fixed?
- Then find a way to fix it instead of commenting on my posts...

That's like saying...:
- Not all servers depend on having NPCs...
Reply
#7

Well, since noone posted to this thread, I believe it's only me who is experiencing this problem. However, I really don't know what could be causing the lags, I've tried almost everything to analyse and locate the problem. Can please anyone who has their own VPS post info about their systems (linux distribution, cpu, ram) and amount of NPC on their servers? I'd be really grateful.
Reply
#8

Your need to remove it if it's causing problems, your host probably has a limited CPU / Server Load Limit. If used other host such as (colorhost, volt host,serverffs..) and I don't interact with these problems as the Server Load (for all of there servers) runs smoothly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)