These are chat archives for ManageIQ/manageiq/performance

25th
Oct 2018
Daniel Berger
@djberg96
Oct 25 2018 22:53
anyone ever successfully use posix_fadvise to get a performance boost?
I have a branch for it for the io-extra gem, but i'm not really seeing a benefit, though perhaps reading plain files isn't really a great use case
Nick LaMuro
@NickLaMuro
Oct 25 2018 23:01

@djberg96 well, the short answer is "no" since this is the first I have heard of it...

But it would be interesting to see a use case where one would want to use posix_fadvise, and then see if using it helps

Daniel Berger
@djberg96
Oct 25 2018 23:01
yeah, i was fiddling with io-extra recently, and within that gem i allow the ability to set directio on
Nick LaMuro
@NickLaMuro
Oct 25 2018 23:02
I assume that sequential IO would be the assumed default by the OS, so I figured most cases, it isn't applicable
Daniel Berger
@djberg96
Oct 25 2018 23:02
which reminded me that Linus thinks that O_DIRECT is DUMB, and i went looking for what he thought was the better alternative
and that led me to posix_fadvise
Nick LaMuro
@NickLaMuro
Oct 25 2018 23:03
yeah, I didn't know until you mentioned it that Ruby's IO even had a #advise method
Daniel Berger
@djberg96
Oct 25 2018 23:03
yeah, i'm trying to think when you would want random access - cryptography maybe?
Nick LaMuro
@NickLaMuro
Oct 25 2018 23:04
maybe a indexed DB?
Daniel Berger
@djberg96
Oct 25 2018 23:04
oh, holy crap, they already integrated it
Adam Grare
@agrare
Oct 25 2018 23:04
@djberg96 yeah I've used it before but didn't see huge benefits
Daniel Berger
@djberg96
Oct 25 2018 23:04
i didn't know that either @NickLaMuro
Daniel Berger
@djberg96
Oct 25 2018 23:06
i had written my open wrapper for io-extra and was fiddling with that
Nick LaMuro
@NickLaMuro
Oct 25 2018 23:07
it is nice that they write it as a no-op for systems that don't support it even, so it is even portable