Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Concerns with CUWO #31

Open
Kainzo opened this issue Jul 19, 2013 · 9 comments
Open

Performance Concerns with CUWO #31

Kainzo opened this issue Jul 19, 2013 · 9 comments

Comments

@Kainzo
Copy link

Kainzo commented Jul 19, 2013

Server = pvp.herocube.net
Machine Specs = Xeonz 3.6ghz / 32GB ram / SSD with 1Gbps port.

Getting severe lag at times and the process for CUWO hits near 100%. I don't believe there is any multi-threading in at all and everything is being done on the main thread.

Just putting this out here because it is an issue and it is my due diligence to report :)

@matpow2
Copy link
Owner

matpow2 commented Jul 19, 2013

cuwo uses async networking, so it won't need multithreading.
I've still yet to run a profiler on cuwo, but I will provide some options to perform profiling soon.

@Jakky89
Copy link

Jakky89 commented Jul 19, 2013

You could try to decrease FPS in the constants.py from 50 to e.g. 25. Had no issues so far.

@Jakky89
Copy link

Jakky89 commented Jul 20, 2013

I begun adding performance improving features like a change flagging system so that e.g. only changed entities have to be sent to clients that are near it. Also I decreased time broadcasting interval.

@matpow2
Copy link
Owner

matpow2 commented Jul 20, 2013

This should be fixed in trunk with the new partial entity updates. Can you confirm?

@Jakky89
Copy link

Jakky89 commented Jul 21, 2013

I don't think that it changed much because there have other optimizations be done first. Also is_bit_set before every read_x block isn't the best thing to improve performance.

@matpow2
Copy link
Owner

matpow2 commented Jul 21, 2013

It did fix it. According to Kainzo, CPU usage went from 80% to 30% on a server with 25 players. This is more than acceptable.

@Jakky89
Copy link

Jakky89 commented Jul 21, 2013

Okay then it has brought something but the things that are implemented yet are very basic. We have to think more about when also e.g. mob movements/attacks, distances, damage values, effects need to be calculated or many other performance critical things need to be done when implementing additional functionality in the future to get everything working like the original server and even better things.

@matpow2
Copy link
Owner

matpow2 commented Jul 21, 2013

Look, provide profile data if you think you have found a bottleneck. Otherwise your concerns are unfounded. We do not make wild guesses - we profile, and optimize from those results. Also, check the issue I closed about your pull request, it makes a note of how your changes break the protocol.

@Kainzo
Copy link
Author

Kainzo commented Jul 23, 2013

Thanks for fixing this Matpow2 - I can confirm that the cpu went from 90% to 30% with your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants