Windows: Investigate speed and CPU improvements with IO Completion Ports #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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.
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.
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.
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.
Packet/Data loss seems to be fixed by Win2004.