From: Eric Wong Date: 2021-06-16T00:54:41+00:00 Subject: [ruby-core:104297] Re: [Ruby master Bug#17664] Behavior of sockets changed in Ruby 3.0 to non-blocking samuel@oriontransfer.net wrote: > I welcome discussion on this point, but for certain, I believe > Ruby being non-blocking by default makes sense and that > approach was proposed by Eric, and I agreed with it and > finally enabled it in Ruby 3. Since there is no outwardly > visible change to behaviour, I didn't think it's a big > problem, but I also noticed that Eric forced Unicorn IO back > to blocking by default, so it might be nice to have is input > too. Yes, I proposed non-blocking originally; but gave up the proposal because of potential incompatibilities (e.g. this one). I've mostly given up on Ruby (and coding in general), so the change to non-blocking happened anyways... Anyways, unicorn doesn't benefit at all from non-blocking socket I/O since it only handles one fast client at-a-time. In unicorn, blocking I/O results in fewer syscalls since there's no intermediate calls to poll/ppoll/select/etc. Non-blocking I/O only makes sense for slow clients (and unicorn could never and will never be capable of handling slow clients). Anyways, I haven't familiarized myself with io_uring, yet; but maybe I'll get around it (just not for Ruby :P) if I still have electricity in a few months time... Unsubscribe: