News for hackers. Stuff that matters.
Re:Redis latency spikes and the 99th percentile by personZ on Thursday October 30, 2014 @12:16PM (#8533855)
Does fork not use copy-on-write? I would expect it to add overhead to all overlapped memory operations going forward, but am really surprised if it literally duplicated the entire memory contents.
Re:Redis latency spikes and the 99th percentile by otterley on Thursday October 30, 2014 @01:08PM (#8534263)
It does, but the kernel must still copy the page tables in full. For a very large process on a 64-bit machine, the amount of copying can be substantial.
Re:Redis latency spikes and the 99th percentile by _bpo on Thursday October 30, 2014 @12:23PM (#8533912)
There can be fast differences in fork times between different virtualization schemes, even if your code is CoW-friendly (and Redis's is).
Re:Redis latency spikes and the 99th percentile by nknighthb on Thursday October 30, 2014 @12:38PM (#8534016)
Actually duplicating the memory contents would be slower still, I'm sure. What seems to be going on here is simply a consequence of paravirtualization needing to implement certain functions in software that would otherwise be taken care of in hardware when using HVM or bare metal.
Re:Redis latency spikes and the 99th percentile by giuliano108 on Thursday October 30, 2014 @04:08PM (#8535514)
Memory fragmentation seems to play a role too. Even if you have (barely) enough free RAM, machines can start swapping and a Redis server in that state is bound to wake you up at night... :(
Re:Redis latency spikes and the 99th percentile by xxs on Thursday October 30, 2014 @05:26PM (#8535924)
If you run a server with anything but "swapoff -a" you're doing it wrong. (or even having any swap partition in /etc/fstab). If the server has to swap, get more RAM or scale your stuff out but never swap.