Comments (7)
@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.
Nope, it's not expected.
Are you sure the measured compression and decompression have the same workload?
from zstd.
What do you mean by "workload" --- every time the client sends a compressed string, the server must decompress it, and vice-versa.
from zstd.
Many applications have way more decompression events than compression events.
It depends on the application, and can't be guessed.
from zstd.
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.
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.
Thinking about this further, this is most likely the reason.
from zstd.
Related Issues (20)
- Enable weak symbol support for Risc-V? HOT 1
- Possibly missing check for truncated initial states in Huffman weight block HOT 4
- Poor compressor behavior on interleaved data HOT 2
- zstd 1.5.5+ has worse performance on Graviton2 nodes than v1.4.4 HOT 4
- [Not a bug] Dictionary building strategy HOT 7
- CLI: Hang bomb with with crafted circular symbolic link causes "zstd -d -r -f" to infinitely loop. "pigz -d-r -f" skips symbolic links with non compressed suffix
- ZSTD Decompression Speed vs Compression Level HOT 3
- is there a pre-trained version for "english" dictionary for web use? HOT 1
- patch-from in single-thread mode performs worse than multithreaded HOT 7
- Consider new release, with #4019 applied
- [reproducibility] Zstd varies compressed output based on the presence of SSE / NEON in some cases HOT 5
- Building libzstd.a using NDK is broken HOT 8
- Crash on benchmark using recursive flag HOT 1
- There is a memory leak defect at line 3466 in the file /zstd/lib/compress/zstd_compress.c.
- Newer releases of the zstd-dev package for Alpine Linux do not have Cmake files, while older versions do. This causes build problems for Alpine projects depending on zstd. HOT 2
- Could you please share the policy or algorithm to generate the dictionary? HOT 2
- segfault when a file should be written to a nonexistent directory HOT 1
- ZSTD-22 is 30 times slower than it should be
- [Help Wanted, Questions] Improving Dictionary Training Process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zstd.