-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bypass disk wirte cache when cache-size-mb
is zero
#5668
Conversation
Have you done any performance tests with write cache disabled? Any benefit to disabing it or simply making sure that "0" actually disables cache as we would expect? |
My theory is this is probably only helpful to those whose filesystem has its own cache layer to group up transactions. Will have to wait for @blind-oracle's results since he has a filesystem with a cache layer. Disabling the cache was trivial enough that I am confident it works. But I am not able to test it right now. |
"cache-size-mb": 0
to disable write cache "cache-size-mb": 0
to bypass write cache
I did the test - it seems to help, the speed was closer to 1Gbit/s most of time, but still I can't really go over that much (some 1.1Gbit/s max). The daemon hits 100% and there it stays. Here's the graph, though it was taken with release flags and might be not very usable. But anyway it seems that the cache is now mostly no-op which is good. |
@blind-oracle Nice. 20-30% improvement is a big improvement. But we better compare Debug build with Debug build to be fair. When you say your CPU is at 100%, do you mean all cores, or just 1? Looking at your other flame graphs, the other big part is the arc4 cipher. Can you generate another flame graph with encryption disabled? I want to identify the remaining parts that are eating up resources. |
Sure, I can do debug, but it's very slow there. I'll try. When I say 100% I mean one core. I don't think that transmission can effectively use several cores... at least I never saw >100% cpu usage. About encryption - I don't think you can disable it, at least the lowest level for it is |
Yeah Transmission is mostly single threaded.
Sure, just set it to |
Which is sad, a thread-per-torrent would be quite efficient I guess, they don't really need to share any state. Here's the graph for debug build & tolerated encryption. |
commented @ #5667 (comment) |
Just as a side thought, it's very cool that hotspot exports flame graphs svgs that include mouseover text for each slice. That is super useful |
@ckerr these particular graphs were made by |
@blind-oracle TIL about flamegraph-rs, thanks for the info! That is really handy |
I agree, they have been very useful. 😁 |
Notes: Setting |
"cache-size-mb": 0
to bypass write cache cache-size-mb
is zero
Idea and rationale from #5667 (comment).