Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Windows: Investigate speed and CPU improvements with IO Completion Ports #1

Open
Xaymar opened this issue Jan 6, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@Xaymar
Copy link
Owner

Xaymar commented Jan 6, 2019

From gathered info, this might allow for even better parallelism on high-core count CPUs, removing the need to stall on read and accept.

Related Links:

@Xaymar Xaymar added the enhancement New feature or request label Jan 6, 2019
@Xaymar
Copy link
Owner Author

Xaymar commented Jan 6, 2019

Accept benefits from this due to the ability to accept the next connection while the on_accept handler is being executed in an IO Completion Port thread. There is also no longer the limit of 64 concurrent connection checks.

Read and Write can benefit from this by being fully asynchronous. Read would no longer wait on the previous on_message to be completed and instead be able to immediately try and read the next header. Write would be even more asynchronous.

Definitely worth experimenting with.

@Xaymar
Copy link
Owner Author

Xaymar commented Feb 2, 2020

Working on this now for another project. IOCP benefits are primarily having the OS do NUMA awareness for us, which drastically improves speed on platforms like ThreadRipper Zen/Zen+ and EPYC. Desktop CPUs will likely also see an increase as the OS will likely schedule things to run on the best core.

@Xaymar
Copy link
Owner Author

Xaymar commented Feb 9, 2020

Completely redesigned Server/Socket model to be easier to use. It is now entirely callback based. The new design is also friendlier towards Linux and Android and allows full control over messaging.

@Xaymar
Copy link
Owner Author

Xaymar commented Mar 5, 2020

Final problem encountered is an odd, unexplainable packet loss of around 3%. This sounds impossible as it should all be on the same machine, but it does happen somehow.

@Xaymar
Copy link
Owner Author

Xaymar commented Jun 21, 2020

Packet/Data loss seems to be fixed by Win2004.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant