From: Eric Wong Date: 2018-04-29T09:15:44+00:00 Subject: [ruby-core:86761] Re: [Ruby trunk Feature#14723] [WIP] sleepy GC Also, added "thread.c (do_select): perform GC if idle" https://80x24.org/spew/20180429090250.GA15634@dcvr/raw And updated "sleepy-gc" git branch @ git://80x24.org/ruby.git to 10bcc1908601e6f35ebef5ff66476b5cea6da96c. I'm not sure if native_sleep() is worth doing GC on in most cases (Mutex#lock, Queue#pop, ...) because that's waiting on local resources from other threads within our process. Typical callers of rb_wait_for_single_fd and do_select wait on external events, so that means our own (Ruby) process is idle. I guess Kernel#sleep can do GC work, too (not sure how common it is to use) Process.waitpid, File#flock, IO#fcntl(F_SETLKW) are some next targets where we can try non-blocking operations and GC before trying blocking equivalents. Then, the next question is: do we start making all connected SOCK_STREAM sockets non-blocking by default again? (as in Ruby 1.8) I'm not sure about nonblock-by-default for pipes, SOCK_SEQPACKET, and listen sockets; because they have round-robin behavior which allows fair load distribution across forked processes. Unsubscribe: