[WIP] Restructure#84
Open
NicolasT wants to merge 29 commits into
Open
Conversation
This allows to set larger maximum sector transfers from userspace, which increases bandwidth in sequential write workloads. This change doesn't have any effect unless some block configuration changes are made (from userspace) as well. Assuming an SRB device, `srb1` was created (using `attach`), first validate its `max_hw_sectors_kb` value: ``` $ cat /sys/class/block/srb1/queue/max_hw_sectors_kb 32768 ``` Next, the `max_sectors_kb` value can be configured. This sets the maximal transfer size for a single call to the CDMI server. The kernel sets this to 512 (1024 sectors) by default. Making this value larger can have a positive impact on performance in some workloads (sequential writes mostly, or writes of large blocks), but also has a negative impact at the kernel side (more allocator pressure etc.). Tune it according to your workload (use `blktrace` or `btrace` to find out write sizes while running your workload). We can e.g. set this to 8MB using ``` $ echo $(( 8 * 1024 )) > /sys/class/block/srb1/queue/max_sectors_kb $ cat /sys/class/block/srb1/queue/max_sectors_kb 8192 ``` After formatting the device, you can quickly validate the performance impact using e.g. ``` $ dd if=/dev/zero of=/mnt/srb1/zeros bs=8M count=$(( 1024 / 8 )) conv=fsync ``` When checking `btrace`, you should see commits of (1024 * 1024 * 8 / 512) sectors (or other relatively large values): ``` 251,0 15 70 570.000979569 6491 C WS 1795072 + 16384 (14691129571) [0] 251,0 8 135 570.413638516 6492 C WS 1811456 + 16384 (15103788266) [0] 251,0 7 399 570.725110955 6496 C W 1916928 + 8192 (2249808356) [0] 251,0 3 1478 570.946574847 6493 C WS 1925120 + 8192 (2470209854) [0] 251,0 5 1072 571.397512583 6490 C W 1867776 + 16384 (10230081008) [0] 251,0 8 136 571.615532644 6492 C W 1948672 + 9216 (3136311330) [0] 251,0 4 250 571.892105568 6494 C WS 1851392 + 16384 (10725763791) [0] 251,0 14 1000 572.277086118 6497 C W 1884160 + 16384 (3804676232) [0] ``` You're looking for lines with 'C'ommit lines for 'W'rites or synchronous 'WS'rites. These lines also provide the sector of the request and the request size (in sectors, 512B units) divided by a '+'. See `man blkparse`.
Also, keep private headers private.
Thanks to f34d45b we no longer need `jsmn` at all.
That code clearly needs some cleanup.
When removing functionality from a kernel driver and claiming it should be implemented in userspace, it really should be.
No need to re-implement.
Some might be required though when `srb.h` is gone.
Contributor
Author
|
Work-in-progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.