All Questions
Caching hard

During a Redis BGSAVE (Snapshot), memory usage can potentially double. Why?

  1. A The primary Redis process must load a second, independent copy of the entire dataset into RAM before it can safely initiate a background snapshot.
  2. B The OS 'Copy-on-Write' mechanism duplicates memory pages modified by the parent process while a child process is dumping the dataset to the disk.
  3. C The fork() system call utilized by the Redis server immediately duplicates all physical memory addresses to ensure the child process has a stable state.
  4. D Redis must allocate an entirely new, secondary hash table to accommodate all incoming write operations while the primary table is being dumped.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions