3 ms·
One thing the author talks about is adding a slog to increase write speed but that is only true for synchronous writes or when your system memory has already be
by water8 4y ago
One thing the author talks about is adding a slog to increase write speed but that is only true for synchronous writes or when your system memory has already been maxed out. The real purpose of a slog is to protect against data loss in the write cache that resides in volatile memory but has not yet made it to disk in the event of a power failure.
- mtlynch 4y ago>One thing the author talks about is adding a slog to increase write speed but that is only true for synchronous writes or when your system memory has already been maxed out. The real purpose of a slog is to protect against data loss in the write cache that resides in volatile memory but has not yet made it to disk in the event of a power failure. I'm admittedly a ZFS newcomer, but what you're describing sounds closer to my understanding of the ZFS intent log than the SLOG. From the TrueNAS documentation[0]: >A ZIL alone does not improve performance. Every ZFS data pool uses a ZIL that is stored on disk to log synchronous writes before flushing to a final location in the storage. This means synchronous writes operate at the speed of the storage pool and must write to the pool twice or more (depending on disk redundancy). >A separate high-speed SLOG device provides the performance improvements so ZIL-based writes are not limited by pool input/outputs per second (IOPS) or penalized by the RAID configuration. I was also under the impression that most I/O for consumer applications is synchronous rather than asynchronous. Like if I open an image in Photoshop, crop it, and save the result, those are all going to be synchronous I/O operations, no? [0] https://www.truenas.com/docs/references/slog/#slog-use-case https://www.truenas.com/docs/references/slog/#slog-use-case
- water8 4y agoA ZIL and a SLOG are the exact same thing. God I love getting downvoted by people have no freaking clue what they’re talking about. They are both a record of writes that are in memory that have yet to be written in the desk. No super cache is going to make your drive write any faster than it can physically write. You were merely cashing data on a nonvolatile storage medium in the event of a power failure were you lose ECC protected ram data. More often than not adding a slog will make your system slower because 1) ram faster than NVMe, and 2) It only applies to synchronous writes which are not that common compared to say rsync which is all asynchronous writes. Remember a synchronous write needs to return to the kernel that it has successfully written the data onto the drive. it is not a fire and forget like asynchronous is. That said having a Zil is important if you’re going to run virtual machines off of your ZFS file share and you want those machines to be fault tolerant to power outages
- mtlynch 4y ago>A ZIL and a SLOG are the exact same thing. God I love getting downvoted by people have no freaking clue what they’re talking about. They are both a record of writes that are in memory that have yet to be written in the desk. Do you have a source for that? The TrueNAS documentation[0] I shared above says that the ZIL is on disk, not in memory. It also says that a SLOG is a type of ZIL, but not all ZILs are SLOGs. Am I misunderstanding that documentation or are you asserting that the documentation is wrong? I'm not downvoting you, by the way. [0] https://www.truenas.com/docs/references/slog/#slog-use-case https://www.truenas.com/docs/references/slog/#slog-use-case