4 ms·
Flat files on a disk == awesome
by dangayle 13y ago
Flat files on a disk == awesome
- moot 13y agoWe've had a surprising amount of difficulty maintaining this over the years, since FreeBSD's NFSv4 implementation kind of sucked for a while, and it doesn't support mounting a memory partition (tmpfs). But you can trick it by mounting the memory partition using nullfs, and then nfsmount-ing that. We used that memory-partition-over-network thing for a while, but actually switched to SSD-over-network because it was faster than the memory partition. I spoke with a FreeBSD maintainer about it and he said what we were doing was so unsupported/unoptimized that he wasn't surprised. We run into weird FreeBSD edge cases pretty often where there are few people, if anyone, who can answer our questions. Sometimes I wish we'd gone with Linux, but after ten years the hassle of switching doesn't seem worth it. Thankfully 9.2-RELEASE has been pretty good to us.
- jhgg 13y agoHave you considered memcached with nginx HttpMemcachedModule? If so, why didn't you decide to use that instead? Seems like all of 4chan's active posts could easily fit in memory of server with a moderate amount of ram (especially if compressed).
- Pxtl 13y agoWhy even write the html to disk? 4chan flushes history so aggressively I'd think you could fit all the high-traffic stuff in memory. if there's a power-blink and the posts get lost? Its 4chan.
- willvarfar 13y agoWithout fsync, its effectively that; but you get atomicity (with unlink etc) and can use multi process etc.