Skip to content

Conversation

@martinsumner
Copy link
Contributor

The primary change here is in list_dir. There was a hacked version of list_dir implemented previously in bitcask - b972602. This was presumably to handle bad scheduler behaviour with fileops in legacy OTP versions.

This no longer works in OTP 22. However, in OTP 22, file I/O has been overhauled to improve the scheduler situation. So - the OTP list_dir is now used again.

I'm going to run a volume test with bitcask before adding this in - to compare OTP 22 to OTP 20.

The use of it was a hack of some sort - which is not presently understood.  It is no longer valid due to erlang/otp@ebbd26e removing the export.

It is assumed that list_dir was originally added to avoid problems no solved via dirty NIF scheduling for file I/O
@martincox
Copy link
Contributor

👍

@martinsumner
Copy link
Contributor Author

martinsumner commented Apr 27, 2020

The volume test didn't give the results I was expecting. I did a mix of GET/PUT/UPDATE/DELETE over 24 hours on an 8-node Riak KV cluster. I had default merge settings - so as merge kicked in this was the dominant factor.

All three effectively had the same overall throughput by the end of the 24 hours (< 2% difference between the runs) - with OTP achieving the most. In OTP22 the merge activity was over much faster, but had a more brutal impact on throughput.

Bitcask_OTPCompare

@martincox
Copy link
Contributor

That's quite interesting on the OTP22 run, and something to bear in my mind when we eventually go in that direction. When we've run OTP20 previously, we've generally seen a much higher gain in terms of cluster throughput - ~25% compared to R16.

@martincox
Copy link
Contributor

martincox commented Apr 28, 2020

Any idea what changed between 20 and 22 that might be responsible for that bump in the disk throughput? It's like some bottleneck has been eased around the file subsystem and it smashes IO much harder.

Had a quick peruse through the OTP20 changelog but nothing really sticks out.

@martinsumner
Copy link
Contributor Author

There are two possible things.

In this PR there is the change to list_dir - which previously used direct access to functions no longer exported in OTP22 to try and handle scheduler issues. We now use the direct exported function (as OTP 22 has various async I/O scheduling improvements).

We've found in other testing that those async I/O and scheduling improvements have allowed us to push things faster when the disk was flat-out (like squeeze and extra 5% throughput).

I wouldn't expect either of these changes to be so dramatic.

EQC tests passed
@martinsumner martinsumner marked this pull request as ready for review May 7, 2020 15:01
@martinsumner martinsumner merged commit dd96f6d into develop-3.0 May 7, 2020
@martincox martincox deleted the develop-3.0-292 branch January 26, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants