Git Product home page Git Product logo

protobuf-net-concurrency's Introduction

protobuf-net-concurrency

Some investigations about protobuf perf with higher degree of parallelism

See this issue for more details!

protobuf-net-concurrency's People

Contributors

wernermairl avatar

Watchers

 avatar  avatar

protobuf-net-concurrency's Issues

Issue ideas and interpretations

facts

  • the code is a lot faster for smaller chunksizes but also far away from linear scaling
  • we see lowest cpu usage
  • we don't see significant memory usage

assumtions

  • more concurrency insider the de-serializer does not help
  • locks and lockcontetion not involved (lot of tests)

questions

  • also if the reader is slow, why parallelization is not helping ?
  • the reader gets slower and slower with the growing of the bulk-size
  • which resource/artifact is not scaling withe the number of nodes in one bucket ?
  • can be the .net memory and instantiating system be the root cause ?
    • the number of nodes is always the same. with smaller buckets of nodes we are faster
  • what is making slow the deserializer for bigger nodes numbers
    • this must be something that has shared user over multiple threads but it must be isolated via processes!

Missing performance in high concurrency scenarios (protobuf-net deserialization)

Issue and Symptoms

Doing a higher number of protobuf deserializations, I'm not able to improve performance using more tasks/threads!

I have written a smallest sample that should help to isolate the problem.
It is a console program, so it can be executed and also some profiling tool can be used.
The output on my machine looks like the following:

image

We see on the green rows: adding more Tasks/Threads reduces the deserialization rate inside all threads. At the end there is basically no win.

In numbers: 4.9 seconds with 1 thread, 3.3 seconds with 8 threads.
My expectation for 8 threads in this scenario: worst case less then 2 seconds, best case less then one seconds (not talking about milliseconds at this time).

Also the Taskmanager shows that the CPU Power is not used.

What I'm doing wrong ?

image

About the example

A proto file and generated c# types are part of this repo (MIT licensed).
All of them are coming from the OsmSharp OpenStreetMap file format (MIT licensed)

Any idea, any help is welcome ;-)

BR
Werner

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.