Has anyone found out how steed walking works?
If so please let me know. I simply can't find out.
For those who have C# sources and have thread/memory usage problems...
Use profilers to see what's your problem...
For big amounts of threads, if you are not using a thread for a player, your problem might be deadlocks. Lately I had about 600 threads at the same time and with dotTrace profiler, I found out that most of them were in a deadlock state as there were no function called on them. Try to keep as few locks as possible.
For those who would like to see such a snapshot here:
[Only registered and activated users can see links. Click Here To Register...]
If anyone got any ideas on how could I get rid of the lock from
Client.Send(packet) I would like to hear their ideas.
As for memory, my server uses about ... 1.2gb ram after a few hours, though, that's what it should use as I decided not to use collections to handle my items because it would need resizing all the time which would cause lag on the server, and players don't really like it, do they?
My problem now is really the deadlocking. If anyone got any ideas I am here to hear and learn.
Regards,
impulse.
If so please let me know. I simply can't find out.
For those who have C# sources and have thread/memory usage problems...
Use profilers to see what's your problem...
For big amounts of threads, if you are not using a thread for a player, your problem might be deadlocks. Lately I had about 600 threads at the same time and with dotTrace profiler, I found out that most of them were in a deadlock state as there were no function called on them. Try to keep as few locks as possible.
For those who would like to see such a snapshot here:
[Only registered and activated users can see links. Click Here To Register...]
If anyone got any ideas on how could I get rid of the lock from
Client.Send(packet) I would like to hear their ideas.
Code:
{
byte[] buff = new byte[packet.Length];
Buffer.BlockCopy(packet, 0, buff, 0, packet.Length);
lock(Cryptography)
Cryptography.Encrypt(buff);
Socket.Send(buff);
}
My problem now is really the deadlocking. If anyone got any ideas I am here to hear and learn.
Regards,
impulse.