High fork times can lead to master unavailability in Redis/Valkey, which is due to the large page table that needs to be copied during a fork.
Even though the fork operation doesn’t copy the actual pages and uses copy-on-write, the page table still needs to be copied.
If the process’s memory consumption is high, the page table is relatively bigger, and copying it can take several seconds, blocking the main thread.
So, all we need to do is optimize the fork time while making sure there are no other repercussions.
Working at scale hits hard… all those OS concepts suddenly come in handy when you’re optimizing this stuff :)