Skip to content
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

ZFS send dedup multi-thread #1112

Closed
mcr-ksh opened this issue Nov 25, 2012 · 7 comments
Closed

ZFS send dedup multi-thread #1112

mcr-ksh opened this issue Nov 25, 2012 · 7 comments
Labels
Type: Feature Feature request or new feature

Comments

@mcr-ksh
Copy link

mcr-ksh commented Nov 25, 2012

Hi,

the "zfs send -vD" is dedup of the stream which is performing very badly. I figured it uses just one core of a multi-core system. So if we have a 28 core machine we wouldn't see any improvement.

Therefore, the feature request to make zfs send dedup multi-threaded.

Best.

@ryao
Copy link
Contributor

ryao commented Nov 26, 2012

Multithreading might not help as much as you think. A known issue when doing zfs send | ... | zfs recv is that the zfs recev part is bursty. zfs recv will read the data stream one transaction at a time, zfs send blocks when a small 64KB receive buffer fills and each transaction is almost always bigger than 64KB. The effect is that the sending and receiving systems will take turns doing work, which is slow.

There is a neat program called mbuffer that allows you to create an additional buffer of a size that you specify. If you were to use it on the zfs recv side of the transfer, it should become much faster.

@wrouesnel
Copy link
Contributor

This is a very naive comment, but couldn't we simply bump the size of that buffer to something larger then most TCP window sizes over say, 10 GbE ethernet, and call it a day as a simple fix?

@akatrevorjay
Copy link

Instead of mbuffer an option is to use pv as it is both in existing Linux
repos and supports cool things like a progress bar ;)
On Nov 26, 2012 12:40 PM, "Richard Yao" [email protected] wrote:

Multithreading might not help as much as you think. A known issue when
doing zfs send | ... | zfs recv is that the zfs recev part is bursty. zfs
recv will read the data stream one transaction at a time, zfs send blocks
when a small 64KB receive buffer fills and each transaction is almost
always bigger than 64KB. The effect is that the sending and receiving
systems will take turns doing work, which is slow.

There is a neat program called mbuffer that allows you to create an
additional buffer of a size that you specify. If you were to use it on the zfs
recv side of the transfer, it should become much faster.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1112#issuecomment-10725348.

@DeHackEd
Copy link
Contributor

DeHackEd commented Dec 7, 2012

'zfs receive' can stall for more than a few seconds while it does a bunch of reads on its local disks, especially for incremental receive jobs. mbuffer, with a default buffer size of over 80 megabytes, makes a lot of sense especially over relatively slow (eg: 100 megabit) networks. TCP buffers alone is not a good idea.

@ryao
Copy link
Contributor

ryao commented Dec 8, 2012

If I recall correctly, mbuffer's default buffer size is 2MB. As for increasing the buffer size, the buffer is in your shell (e.g. bash), so it is not something that we can control unless we add another buffer. That is what mbuffer does.

@ryao
Copy link
Contributor

ryao commented May 21, 2015

5c3f61e implemented a larger receive buffer.

@behlendorf
Copy link
Contributor

b738bc5 also significantly improved performance by improving the prefetch.

pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…ct_agent (openzfs#1112)

build(deps): bump anstyle-wincon in /cmd/zfs_object_agent

Bumps [anstyle-wincon](https://github.com/rust-cli/anstyle) from 1.0.1 to 1.0.2.
- [Commits](rust-cli/anstyle@anstyle-wincon-v1.0.1...anstyle-wincon-v1.0.2)

---
updated-dependencies:
- dependency-name: anstyle-wincon
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

6 participants