Source Memory Usage

05/12/2012 21:00 shadowman123#1
well my Source Consumes 88k Memory and it get raised by 30 when player login or so .. so my questions : -

1 - is it Normal or bad ?

2 - if i got same features but Consume just 20k would it matter in performance and sending faster Packet or w.e

3 - How to Reduce its CpUsage and memory too ?
05/12/2012 21:15 Spirited#2
I didn't know that memory was a unit of measurement. I've always used mbs. Anyways... the reason why servers are costly when it comes to memory is because they have a map system to keep track of. 88mbs (if that's what you're measuring with) is fine. NewestCoServer's map system takes up a gb of memory. Impulse's new source takes up about 110 mbs (I think). My map system costs me 380mbs if that gives you perspective (on the other hand, i'm keeping track of 4x as much information as you are, so you can do the math).

As far as features go... I'm not sure what you mean. If a feature takes up less memory and does the same thing, then it's more efficient. If it's taking up additional memory because it's keeping track of universal, pre-built packets that it doesn't have to build every time, then it's not the same.

Efficiency is all based on how the server is programmed. If it's programmed well, it'll have less steps to execute when handling the client. The less steps the server has to execute, the less cpu it takes up.
05/12/2012 21:21 dego4ever#3
lol, Albetros take "280" MB
05/12/2012 22:36 turk55#4
Quote:
Originally Posted by dego4ever View Post
lol, Albetros take "280" MB
Don't forget that Albetros is very well written.
05/12/2012 22:47 CptSky#5
The amount of memory used is something, but the most important thing is to see if the amount used have a lot of fluctuation. If each time a player connect to the server, you get a few Mo that you never lose after his disconnection, some memory isn't deleted. If when you have players, your memory is always between 80-120 Mo, but really unstable, there is a problem.

Actually, my map system isn't optimized at its maximum but my emulator uses 155 Mo at the start. With the first player that activate a few thread, I go to 167 Mo. After, the number of players doesn't change much thing. The used memory is always +-5 Mo depending of the amount of item on the ground, etc, but always stable.

80-100 Mo for a server is really normal. Also, you can easily go up to 400 Mo and it will not be a problem. You need stability.
05/13/2012 00:18 shadowman123#6
Quote:
Originally Posted by CptSky View Post
The amount of memory used is something, but the most important thing is to see if the amount used have a lot of fluctuation. If each time a player connect to the server, you get a few Mo that you never lose after his disconnection, some memory isn't deleted. If when you have players, your memory is always between 80-120 Mo, but really unstable, there is a problem.

Actually, my map system isn't optimized at its maximum but my emulator uses 155 Mo at the start. With the first player that activate a few thread, I go to 167 Mo. After, the number of players doesn't change much thing. The used memory is always +-5 Mo depending of the amount of item on the ground, etc, but always stable.

80-100 Mo for a server is really normal. Also, you can easily go up to 400 Mo and it will not be a problem. You need stability.
Hmm well iam using Impulse based source and Worked Alot on it .. And Actually Packets r sent fast .. and the Memory usage goes from 88 - 90 to 130 once a player loign So is that means its Stable Source ?
05/13/2012 02:43 Zeroxelli#7
You can't measure the stability based on one or two clients. You need around 5-10 to even start to get an accurate measurement of what you will end up with. My source takes up around 112MB at start, and grows maybe 1MB per client (sometimes less).
05/13/2012 03:36 Spirited#8
It depends on a lot of factors. The most you can do is code things as efficiently as you can and hope for the best.
05/13/2012 09:38 Korvacs#9
It entirely depends how your source is written, how big your client object actually is for example, how you load and store your maps, how complex your maps tile system is, how many mobs you have spawned, how you handle your packets.

Realistically you could use 1GB happily for your fully loaded empty server, and then upto 2MB for each client and then even with 1000 players your still only using 3GB, with VPS/Dedi's having as much as 8/12GB of ram that you can utilise theres no reason why you shouldnt use it, provided it actually helps make your server more efficient (ie. takes less time to access data when compared to loading from file/database).

Low memory usage != more efficient, equally High memory usage != more efficient, its all about finding the balance.

Just to further put this into context, you could fully load every item from your items table of your database into memory, your memory usage would go through the roof, but its likely that loading all of those items would take some time, and that accessing the right ones from memory could take longer than loading them from the database. So this would be a bad idea...
05/13/2012 15:10 shadowman123#10
Pretty Good Explianations especially Korvacs

Big Thx For All of You guyz For informations
05/13/2012 22:31 { Angelius }#11
Quote:
Originally Posted by shadowman123 View Post
Pretty Good Explianations especially Korvacs

Big Thx For All of You guyz For informations
Dude do you ever hit the thanks button ? its for free you know.
05/13/2012 23:43 shadowman123#12
Quote:
Originally Posted by { Angelius } View Post
Dude do you ever hit the thanks button ? its for free you know.
i do know for sure but i prefer to Thank Them in Comments better then using this buttom Beside i use it smtimes
05/14/2012 00:03 Spirited#13
Quote:
Originally Posted by shadowman123 View Post
i do know for sure but i prefer to Thank Them in Comments better then using this buttom Beside i use it smtimes
Thanks for your appreciation of our help, but idk. I'm not sure about everyone else, but I'm a relatively new member and not many people know who I am or how dedicated I am to this community, improving my programming skills for higher job opportunities, or developing for Conquer Online. It really helps me show people that I mean business when I have a higher thanks count; it's like my reputation in the community. I know I don't want to be a moderator atm, but maybe some time in the future I'll be applying and they'll be looking at my thanks count. They won't see your verbal thanks, they'll see my overall count and judge me on that. Those are my thoughts about it, and there are probably more reasons that I don't know about for thanking someone using the button, but I do appreciate your verbal comments, so thank you. :awesome:
05/14/2012 02:35 Mr_Hitch#14
Quote:
Originally Posted by { Angelius } View Post
Dude do you ever hit the thanks button ? its for free you know.
yeah its :D
05/14/2012 07:26 Zeroxelli#15
Who are you kidding, the "Thanks" button is only for decoration these days.