What is swb-free?
- swb = streaming-write-buffer = in-memory buffer where asd keep on appending incoming record writes.
- As each swb gets full, it is put on the write-queue (“w-q”), to be processed by the “device-writer” thread for persisting to disk.
- Once the device-writer is done writing the data in the swb to disk, it returns the swb to the “swb-free” pool, to be re-used.
- If the disk is fast enough and consumes all swb passed to it, faster than the incoming writes fills an swb, we should see swb-free to be just 1.
- The fact that you see “swb-free” to be 16 means at one time in history, disk writing was slower than in-coming writes filling up swb’s, possibly > 16 swb’s in-flight. (If this were a permanent condition, you’d see “w-q” keep increasing, and eventually getting “queue too full”). But somehow the device-writer caught up (maybe because no writes were coming in). So the device-writer returned all the processed swb’s back into “swb-free” pool.
- Imagine the swb inflight peaked at 100. We’d have 100 swb-free’s. It’s not good to keep all of them around forever. So we put in a slow removal process. That process removes 16 swb’s each time (or something like that).