cpu usage on dm2(+) servers

Join Discord

thedeath

LOMCN Developer
Developer
Mar 26, 2003
1,340
90
294
think i should make all the drops, npc commands, ... case sensitive?
this should reduce cpu usage on the files (although i cant predict how much reduction but well lets say that having a line of code case insensitive like everything is now takes 5times more cpu time then having it case sensitive)
obviously this might look like a great thing but it's not like it's being done non stop
but for things like drops, npc commands, gm commands, ... i feel that it could really make a rather big difference (especialy on servers with alot of npc's, mobs in their db, items in their db ect)

another something that would really improve server performance would be if hosts didnt fill their db's with tons of unused items and mobs cause generaly even unused items and mobs drain the cpu quite a bit, the bigger the mob, item db the more time it takes to go through it when the server has to search for a specific mob or item
 

Wittin

Ex-Δdministrator
VIP
May 7, 2003
1,318
1
197
315
Awsome idea, and some good usefull information for server owners.

I'm all for the change!
 

jasper

Golden Oldie
Golden Oldie
Sep 10, 2005
890
3
125
anything to reduce server stress is a good thing,, not sure but i reckon most people put npc commands in block capitals anyway. i think some things are already case sensitive from memory?, and im sure most owners could find a serch replace program to make drops same case as db.
 

lifco

Untrusted Member
Legendary
Golden Oldie
Loyal Member
Jul 6, 2004
3,400
66
195
UK/Italy
its a well know fact on any mir server the best way to cut down cpu is on the shop npcs why have them all doing 100+ a hour, when say you only have 50 players online

lif
 

Dave85

LOMCN Veteran
Veteran
Jan 20, 2006
267
2
65
Personally i don't feel it matters if its cap sensitive or not, what the most of the reasons for laggy servers is lack of power and most hosts run their server off of a standard home PC that can hardly be used to open paint XD

My server is running happy as larry and has been for a while, i saw what was causing the problems and worked around it and am still supprised that no one else has seen this yet as i continually see 'DBServer errors' or 'SQL errors'.

@TD, you have done and still are doing an amazing job of coding the server files and feel that you are taking alot of crap and having to back track all the time to try and fix things that don't actually have any problems, meaning that it could actually well be the hosts fault of missing certain SQL info in the updates doc or even not updating all the server components or worst of all running it on a poor performing home PC.

All i can say on this matter is that the server owners and hosts need to rethink a few things.

1. what type of errors am i recieving?
2. whats causing it?
3. fix it

The main issue that everyone suffers from is a fairly easy thing to spot and can be fixed just as easily too, but this is a owner or hosts fault not TDs, he fixed it along time ago but no one ever saw it.
 
Last edited:

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
the point of what hes saying is that for a server WITHOUT errors, then this will be improving the performance.
we have no errors, but it would be nice to have a reduced cpu usage since ours runs around 45% on a dedicated server
 

Dave85

LOMCN Veteran
Veteran
Jan 20, 2006
267
2
65
What i'm saying is that this won't make much if any differance atall. Even for servers without any errors the only way of reducing the server load is delete unused maps/items/mobs etc... clean-up SQL.

The server as it is, is running very efficiantly, it goes back to my previous post of making the point that maybe its time that server owners got to know a bit about their server and how it works before telling TD that hes done something wrong or that he needs to fix it when its fine the way it is.

Simple awnser to most problems and also overloading or too much cpu usage: upgrade your hardware...

@Fire, you say that your cpu is running at a stable 45%...isn't that a good thing? its not like its being used for anything other than mir so whats the problem?

Useful info:
Also dedicated servers arn't all that due to how much they cost and also its a pain in the arse not having the machine in front of you to repair, RDA doesn't seem good enough.

Bandwidth isn't the main cause of lag on most servers its the response time of the server and how quickly it can process the infomation, this is a known fact because mirs packet sizes are very small something like 5kbs for 10-20 ppl online so why bother having a 100mb?

Along the same lines of bandwidth for deicated servers, beaware that depending on which company you are with you may find you have a 10mb connection NOT 100mb (i found this out from personal experiances).

Also beaware that UPLOAD speed is just as important as download speed.

I'm not giving too much away about the monster I built for mir because it took me along time to build and alot of money, but the next upgrade will have a hex core 3.2Ghz processor and about 1Gb of GDDR3 Ram.

Spec will be:
CPU: 19.2Ghz
RAM: 1Gb at 1400Mhz
Memory Bus Bandwidth: 512 GB/sec

Hopefully this will make ppl consider if their server is powerful enough and instead of dragging the server down to a level to perform a tiny bit better on their home PC that they should think about building a server that can cope with what mir has to offer.
 
Last edited:

thedeath

LOMCN Developer
Developer
Mar 26, 2003
1,340
90
294
you know dave i wouldnt have posted this if it wouldnt improve cpu usage (although i admit it's likely to only improve 1-3% cpu tops )

fact is that for example the dropfiles: when a mob spawns it's drop gets 'calculated' the way this is done is to put it simple:
- server has a list of all the items in the dropfile stored in it's memory (only itemnames tho)
- server goes through the list and randomly selects items to go in it's drop
- now it has to find those itemnames in the item table, it does this by going from the start of the table till the end using comparetext(dropname, tablename)

so say there are 50 items (with pots and all) in your dropfile
and 500 items in your db
that means that on average to create one drop it'd have to do the comparetext about:
30 (provided 30 item drop which i think is a normal amount for a boss) *
300 (taking into account that if an item is in index 10 it's only going to need 10 times but if it's at 500 it's going to need 500 times to find so i took about average)
aka 900 times comparetext for 1 boss drop
now if you know that i tested it the other day:
made a program that does the same thing 10 * 1000 * 1000 * 1000 times
using comparetext to compare 2 strings: average 550 000ms
using regular = sign to compare 2 strings: average 120 000 ms
so even tho we are talking about only like 0.0001ms each time
since it's done 900 times for one drop, add to that the amount of boss's, mobs in servers these days
and you do get an increase

same thing with npc's and gm commands and stuff
i checked the total amount of commands on the files:
aprox 150 (might have miscounted 1/2)
now that means that every time a a person uses an @ command it has to go through the list untill it finds the command
in most player cases it'll find it the first 20/30 try's cause the player ones are at top, but when it comes to gm commands it has to go through the other 120 aswell to find them

this might all seem like nothing and well it's not a big thing doing it once
but on bussy servers it means a rather big waste of cpu just doing that
best idea would be to stop adding tons of features and delete the stuff mir doesnt need but then hosts would be unhappy lol
 

TrueADM

Software Developer
VIP
Jan 16, 2004
214
0
102
What i'm saying is that this won't make much if any differance atall. Even for servers without any errors the only way of reducing the server load is delete unused maps/items/mobs etc... clean-up SQL.

The server as it is, is running very efficiantly, it goes back to my previous post of making the point that maybe its time that server owners got to know a bit about their server and how it works before telling TD that hes done something wrong or that he needs to fix it when its fine the way it is.

Simple awnser to most problems and also overloading or too much cpu usage: upgrade your hardware...

@Fire, you say that your cpu is running at a stable 45%...isn't that a good thing? its not like its being used for anything other than mir so whats the problem?

Useful info:
Also dedicated servers arn't all that due to how much they cost and also its a pain in the arse not having the machine in front of you to repair, RDA doesn't seem good enough.

Bandwidth isn't the main cause of lag on most servers its the response time of the server and how quickly it can process the infomation, this is a known fact because mirs packet sizes are very small something like 5kbs for 10-20 ppl online so why bother having a 100mb?

Along the same lines of bandwidth for deicated servers, beaware that depending on which company you are with you may find you have a 10mb connection NOT 100mb (i found this out from personal experiances).

Also beaware that UPLOAD speed is just as important as download speed.

I'm not giving too much away about the monster I built for mir because it took me along time to build and alot of money, but the next upgrade will have a hex core 3.2Ghz processor and about 1Gb of GDDR3 Ram.

Spec will be:
CPU: 19.2Ghz
RAM: 1Gb at 1400Mhz
Memory Bus Bandwidth: 512 GB/sec

Hopefully this will make ppl consider if their server is powerful enough and instead of dragging the server down to a level to perform a tiny bit better on their home PC that they should think about building a server that can cope with what mir has to offer.

Do you know how a multi-core processor works? A multi-core processor will not benefit you unless the software supports multi-core instructions (threaded software) - meaning having 6 cores is absolutely pointless when the server doesn't function to support it.

Also you cannot have 512 GB/sec bandwidth - it's impossible to achieve that even with an overclocked rig. The fastest overclocked rig on Earth runs at 18 GB/sec.

There is no hex-core 3.2 Ghz desktop/server processor, thus your prcoessor doesn't exist. The only possible way you could have a six-core system is with the use of a modular processing design (similar to that of SLI). Which doesn't exist yet.

Furthermore, there is no motherboard support for hex-core processing, thus your processor would not even boot.

Thus your server is a fallacy.
 
Last edited:

Wittin

Ex-Δdministrator
VIP
May 7, 2003
1,318
1
197
315
Do you know how a multi-core processor works? A multi-core processor will not benefit you unless the software supports multi-core instructions (threaded software) - meaning having 6 cores is absolutely pointless when the server doesn't function to support it.

Also you cannot have 512 GB/sec bandwidth - it's impossible to achieve that even with an overclocked rig. The fastest overclocked rig on Earth runs at 18 GB/sec.

There is no hex-core 3.2 Ghz processor, thus your prcoessor doesn't exist. The only possible way you could have a six-core system is with the use of a modular processing design (similar to that of SLI). Which doesn't exist yet.

Furthermore, there is no motherboard support for hex-core processing, thus your processor would not even boot.

Thus your server is a fallacy.


lol *waits for him to try to prove you wrong, and almost certainly fail miserably*
 
Mar 23, 2003
922
4
265
Cairo Orbital Defence Platform
What i'm saying is that this won't make much if any differance atall. Even for servers without any errors the only way of reducing the server load is delete unused maps/items/mobs etc... clean-up SQL.

The server as it is, is running very efficiantly, it goes back to my previous post of making the point that maybe its time that server owners got to know a bit about their server and how it works before telling TD that hes done something wrong or that he needs to fix it when its fine the way it is.

Simple awnser to most problems and also overloading or too much cpu usage: upgrade your hardware...

@Fire, you say that your cpu is running at a stable 45%...isn't that a good thing? its not like its being used for anything other than mir so whats the problem?

Useful info:
Also dedicated servers arn't all that due to how much they cost and also its a pain in the arse not having the machine in front of you to repair, RDA doesn't seem good enough.

Bandwidth isn't the main cause of lag on most servers its the response time of the server and how quickly it can process the infomation, this is a known fact because mirs packet sizes are very small something like 5kbs for 10-20 ppl online so why bother having a 100mb?

Along the same lines of bandwidth for deicated servers, beaware that depending on which company you are with you may find you have a 10mb connection NOT 100mb (i found this out from personal experiances).

Also beaware that UPLOAD speed is just as important as download speed.

I'm not giving too much away about the monster I built for mir because it took me along time to build and alot of money, but the next upgrade will have a hex core 3.2Ghz processor and about 1Gb of GDDR3 Ram.

Spec will be:
CPU: 19.2Ghz
RAM: 1Gb at 1400Mhz
Memory Bus Bandwidth: 512 GB/sec

Hopefully this will make ppl consider if their server is powerful enough and instead of dragging the server down to a level to perform a tiny bit better on their home PC that they should think about building a server that can cope with what mir has to offer.

Run folks, run! Auron isn't happy!

--

The performance boost from implementing this change will be larger than you appear to be giving it credit. While there is no doubt the best way to boost performance is to reduce load, this will better affect those that HAVEN'T reduced load, and have comparitively little effect on those that have.

The server runs efficiently? Are you on crack? Seriously. How in the great googamooga is using TCP for interprocess communication efficient. ****, the very thought of me makes me want a cold shower.

So you know, that's where you lost any credibility you had.

While bandwith is not the major problem, connection latency is. And the only way to drop that latency is with a higher-bandwith, better contention connection. So surely that's a moot point? One doesn't come without the other, you know.

Erm, as regards your bandwith speed, you may have ordered a 100mbit (8bits == 1 byte, kids), and thus your effective data transfer speed would be (100/8) - Overhead. Hence, your 10MByte figure.

I shouldn't even comment on the specs. The only widely available CPU architecture which would offer you A 6-core system is IBM's CELL. And of that, only 1 core would really be useful for MiR.

You CANNOT. Infact, hold on, I've not stressed that enough.

You cannot multiply core frequency by core number.

You do NOT have close to 20GHz of effective power. You'd be lucky if each process got 3.2GHz a pop, and that assumes you've manually told windows which core to run each process.

I'm going to have to assume that's RDRAM, or some DDR3 spec I've not read about. Either way, 1GB would be a stupidly low figure. It'd be like buying a Jaguar, and only using 1st gear.

--

If people want a faster server, they accept TDs code modifications, they buy the fastest CPU they can afford, get the largest & fastest RAM configuration they can afford, get a nice SATA RAID setup, and get a nice flavour of SDSL(Or rented line).

That's all there is to it. Other than TD's sexy little free mods, you have to pay for the rest. And you have to have SOME idea about the parts you're buying.

--

*Auron goes to watch Monty Python to calm down...*
 

Dave85

LOMCN Veteran
Veteran
Jan 20, 2006
267
2
65
LOL at the replys...

Very few people are aware of the type of server i am building as it is hardly spoken of. The specs listed are exactly what i will be building, tbh if anyone used google to find out any info on atleast 1 of the specs listed they'd find the sort of hardware i shall be using.

The custom hex core will never be fully used by mir but this is a project for myself to build a 'super computer' and just run mir on it for maximum performance, it will be running on a process of an overflow system where say core 1 reaches e.g. 95% then core 2 will cover the overflow and act as a secondary buffer to ease load on the 1st.

The GDDR3 RAM is more than enough for the cores as someone will soon find out. 'Memory Bus Bandwidth: 512 GB/sec' this information was given to me regarding the hardware being used so sorry if i got it wrong but this is what it clearly stated it to be running at so i'd suggest doing some indepth research before posting.

As i have said before i won't be releasing any indepth info on the server setup and what it will look like as most ppl that know hardware will spot what will be inside it.

like i said regarding bandwidth 100mb is no better than 10mb for the fact that mir will never use it all because the packet information is so pathetic that you could have 100+ ppl online even on a 2mb connection providing your upload speed is anygood and still have no lag what so ever *100mb is a waste of money* it is mainly the upload speed you need to worry about.

Back to the point of TDs original post, not being funny but isn't it better to work forward instaed of taking steps backwards just to save 1-3% cpu usage? dunno really but the way my servers setup, it seems more than happy to run with no problems atall.
 

TrueADM

Software Developer
VIP
Jan 16, 2004
214
0
102
LOL at the replys...

Very few people are aware of the type of server i am building as it is hardly spoken of. The specs listed are exactly what i will be building, tbh if anyone used google to find out any info on atleast 1 of the specs listed they'd find the sort of hardware i shall be using.

The custom hex core will never be fully used by mir but this is a project for myself to build a 'super computer' and just run mir on it for maximum performance, it will be running on a process of an overflow system where say core 1 reaches e.g. 95% then core 2 will cover the overflow and act as a secondary buffer to ease load on the 1st.

The GDDR3 RAM is more than enough for the cores as someone will soon find out. 'Memory Bus Bandwidth: 512 GB/sec' this information was given to me regarding the hardware being used so sorry if i got it wrong but this is what it clearly stated it to be running at so i'd suggest doing some indepth research before posting.

As i have said before i won't be releasing any indepth info on the server setup and what it will look like as most ppl that know hardware will spot what will be inside it.

like i said regarding bandwidth 100mb is no better than 10mb for the fact that mir will never use it all because the packet information is so pathetic that you could have 100+ ppl online even on a 2mb connection providing your upload speed is anygood and still have no lag what so ever *100mb is a waste of money* it is mainly the upload speed you need to worry about.

Back to the point of TDs original post, not being funny but isn't it better to work forward instaed of taking steps backwards just to save 1-3% cpu usage? dunno really but the way my servers setup, it seems more than happy to run with no problems atall.

I asked my buddies from Anandtech and Xtremesystems, they don't believe you either. Could you post links to your sources?
 
Last edited:

Dave85

LOMCN Veteran
Veteran
Jan 20, 2006
267
2
65
My sources will remain unnamed because i wish to keep my project underwraps, also due to the nature of what im building and software that is being used/created for it.

All i can say is the specs are more than possible to reach and could even be doubled *providing things go well*. All i can say for now is that it will be using a method of software to achive this kind of power.

If/when i release the info on what i used and how it was made, only then will such a bold claim seem so obvious that it could be done. Sorry for pissing anyone off about this, i didn't think mentioning a project i was working on would cause such a fuss.

Plus any advise on coolant systems will be great, i wanted to know if the water coolant system was anygood or if a ton of extra heatsinks and high powered fans would do the trick. Thanks in advance for this.
 
Mar 23, 2003
922
4
265
Cairo Orbital Defence Platform
My sources will remain unnamed because i wish to keep my project underwraps, also due to the nature of what im building and software that is being used/created for it.

All i can say is the specs are more than possible to reach and could even be doubled *providing things go well*. All i can say for now is that it will be using a method of software to achive this kind of power.

If/when i release the info on what i used and how it was made, only then will such a bold claim seem so obvious that it could be done. Sorry for pissing anyone off about this, i didn't think mentioning a project i was working on would cause such a fuss.

Plus any advise on coolant systems will be great, i wanted to know if the water coolant system was anygood or if a ton of extra heatsinks and high powered fans would do the trick. Thanks in advance for this.

Surely if you wanted to keep it quiet, you wouldn't post it on a forum? ;)

Sorry, but your posts are pretty entertaining - mind if I forward them to some guys at work?

--

http://en.wikipedia.org/wiki/List_of_device_bandwidths

There's a quick list you might want to look at. Still sure it's 512GB/sec? ;)

--

You speak of software. Well, it seems plain to me you're not going to be using Windows, so I've got a serious headache wondering what the hell kind of environment you intend to run it on?

--

Also, you do know no such process overflow system exists, right? I think you could use a crash course in http://en.wikipedia.org/wiki/Thread_(computer_science)

--

You do know that telling us who's fabricating your mythical holy grail of a CPU would be harmless right?

--

Time for a Digg phrase - pics or fake.
 

Fire

Golden Oldie
Golden Oldie
Apr 15, 2003
1,302
1
195
the question i have is what is the POINT of building this "super computer" even if it can be made, if you are just going to run mir on it... it will be exceptionally expensive, and will get outdated... and it wont run a mir server with any real perfomance boost... oh and the other point is is that if you arent going to be using Windows as Auron says then the gates would only run if you then emulated windows...

oh and perhaps a mod could split the topic so TD has a non flamed topic???
 

Dave85

LOMCN Veteran
Veteran
Jan 20, 2006
267
2
65
@Auron

1. I only mentioned it, wasn't expecting it to cause a fuss, but if it will make your mates laugh go for it :)

2. Heres the Memory Info straight from the manufacturer:
44.8 GB/s memory interface bus bandwidth
512 GB/s memory bandwidth
44.2 GB/s front-side bus

3. Sorry about giving you a headache.

4. Doesn't it?

5. The CPU manufacturers name and all other names will not be disclosed until the project is complete.
 

TrueADM

Software Developer
VIP
Jan 16, 2004
214
0
102
@Auron

1. I only mentioned it, wasn't expecting it to cause a fuss, but if it will make your mates laugh go for it :)

2. Heres the Memory Info straight from the manufacturer:
44.8 GB/s memory interface bus bandwidth
512 GB/s memory bandwidth
44.2 GB/s front-side bus

3. Sorry about giving you a headache.

4. Doesn't it?

5. The CPU manufacturers name and all other names will not be disclosed until the project is complete.

You stated earlier that you'd be using GDDR3 memory. There is no memory controller available that can support those speeds and natively use GDDR3 memory. Who is this manufacturer? I'd love to see who's conning you.