leo-project / leofs

The LeoFS Storage System
https://leo-project.net/leofs/
Apache License 2.0
1.55k stars 155 forks source link

[leo_storage] Check if +SDio with OTP 21 works #1131

Open mocchira opened 6 years ago

mocchira commented 6 years ago

Cited from http://erlang.org/doc/apps/erts/notes.html#erts-10.0

The number of driver async threads will now default to 1 as the standard drivers do not use them anymore. Users that changed this value to tweak the file driver should replace +A with +SDio since it now uses dirty IO schedulers instead of async threads.

Since we have used +A option to better perform disk I/O for AVS files, we need to check if +SDio with OTP 21 doesn't degrade the performance.

mocchira commented 6 years ago

Confirmed that the option +SDio works as expected on OTP21 build with the patch below applied to leo_storage.schema.

+%% For OTP21
+{mapping,
+ "erlang.dirty_io_threads",
+ "vm_args.+SDio",
+ [
+  {default, "32"}
+ ]}.
+

If the option was given to a lower version OTP which doesn't support SDio then leo_storage can't start due to the invalid parameter so that the patch should be applied after the official packages will be bundled with OTP21.