yallie / Zyanea

:zzz: Zyanea was the codename for the next version of Zyan Communication Framework, a proof of concept.
http://zyan.com.de
MIT License
21 stars 5 forks source link

Serialization and transport performance #4

Open msin opened 5 years ago

msin commented 5 years ago

Hi Alexey,

We use Zyan in production since version 2.5 (thanks for your efforts!). Now we decided to migrate to .NET Core and I've made some performance tests of Zyanea: Local server Processed 100 messages of 1024 bytes: 115 ms Processed 100 messages of 5 bytes: 98 ms Remote server Processed 100 messages of 1024 bytes: 1000 ms Processed 100 messages of 5 bytes: 865 ms

100 msg/sec is OK, but this limit means the full performance of a single processor core (100% utilization) and this is bad sign of serialization/transport overhead.

I've seen similar situation on Akka.NET - local actor messaging rate is ~30 M/sec, remote messaging less than 10k/sec.

Is it possible to reduce this overhead?

Thanks

msin commented 5 years ago

Caching of Task resultProperty has no effect.

yallie commented 5 years ago

That's interesting, thanks for the observation... I currently have no idea where the bottleneck could be. Profiling should probably reveal something of interest.

Keep in mind that Zyanea project is just a sketch, not a ready to use library like Zyan. I wrote it about a year ago and have never used in in production. It's missing a lot of crucial Zyan features (session management, events, etc). Also, I wasn't satisfied with messy SRP implementation in MessageWire, so I've built my own since then.