Coder Social home page Coder Social logo

Comments (7)

felixhandte avatar felixhandte commented on September 1, 2024 1

@Cyan4973 is asking whether the volume of compression and decompression is the same. It sounds like the answer is yes: every byte of traffic is compressed once and decompressed once in your use case, yeah? This isn't true for lots of use cases--many are write once and read many, which can produce the skewed cpu time you're observing.

When you say compression is 5% of the workload and decompression is 15%, are these comparable overall workloads? Is it possible that the process that is doing the compression is doing a lot more work in general and so the compression is a smaller overall share despite being more work in absolute terms than decompression?

Or are these processes running on significantly different hardware? Or are they being compiled differently (one might be a debug build while the other is an optimized build)?

from zstd.

Cyan4973 avatar Cyan4973 commented on September 1, 2024

Nope, it's not expected.

Are you sure the measured compression and decompression have the same workload?

from zstd.

DUOLabs333 avatar DUOLabs333 commented on September 1, 2024

What do you mean by "workload" --- every time the client sends a compressed string, the server must decompress it, and vice-versa.

from zstd.

Cyan4973 avatar Cyan4973 commented on September 1, 2024

Many applications have way more decompression events than compression events.
It depends on the application, and can't be guessed.

from zstd.

DUOLabs333 avatar DUOLabs333 commented on September 1, 2024

Sorry, I'm not sure I understand what you mean by "event" --- is this calls to the respective API-facing functions, or calls to internal compression/decompression routines?

from zstd.

DUOLabs333 avatar DUOLabs333 commented on September 1, 2024

Oh, ok, --- in that case, I didn't think about it before, but it is possible that when the server sends back data to the client, it sends more data than when the client sends the server data (I didn't profile the server side, only the client --- the client is a Linux VM, and the server is a Macbook running Big Sur).

from zstd.

DUOLabs333 avatar DUOLabs333 commented on September 1, 2024

Thinking about this further, this is most likely the reason.

from zstd.

Related Issues (20)

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.