28 karma · joined Dec 9, 2016 (9y ago) · 21 submissions
1.
Fearless concurrency with hazard pointers(ticki.github.io ↗)
2 points · by ticki_ · 9y ago · discuss
comment 9y ago · link · parent
> I don't know if the authors are here, but if they are - would you comment on fragmentation and the dangers of growing a filesystem past 95-98% full ?
Fragmentation isn't an issue in TFS, at all. Because it is a cluster-based file system. Essentially that means that files aren't stored contagiously, but instead in small chunks. The allocation is done entirely on the basis of unrolled freelists.
This does cause a slight space overhead (only slight, coming from the fact that metadata of the file is stored in the full form), but it completely eliminates any fragmentation.
comment 9y ago · link · parent
It is very similar to ZFS.
comment 9y ago · link · parent
What makes you think it isn't? It definitely is. In fact, it borrows several ideas from ZFS wrt/ integrity.
For example, it uses parent block checksums like ZFS.
comment 9y ago · link · parent
What I think of as "cryptographic hash function" is a function resistent to pre-image attack, second pre-image attack, and collision generation.
Neither of those are satisfied by SipHash, and can thus not classify as a cryptographic hash function by the normal definition.
comment 9y ago · link · parent
SHA256 is very slow, and that's no surprise. It's cryptographic after all.
Here's a small list of usecases for non-cryptographic hash functions:
- Checksums and error correction codes, as long as there is no way to maliciously use this.
- Hash tables. These always use non-cryptographic hash functions.
- Bloom filters.
- Heuristic fingerprinting. They're not strong enough to be used for normal data fingerprints, but they can be used as a way to decide if two buffers are "probably equal" or "certainly not equal".
Hash tables are the main one. Cryptographic hash functions are almost never used in them. SipHash is a popular choice, but it is not cryptographic. That is a misunderstanding: It's a MAC function.
comment 9y ago · link · parent
Take SHA3, which is around 50x slower than SeaHash. That is really really bad for hash tables.
When hash collisions happen in hash tables, they're resolved through collision-resolution strategy, such a linear proping.
Fingerprints are one very narrow usecase for hash functions, and there are tousands of other uses.
comment 9y ago · link · parent
If you need fingerprints, don't use SeaHash, but if you are looking to insert into e.g. a hash table, you shouldn't use BLAKE2. It's awfully slow for that.
comment 9y ago · link · parent
Note that I am not a cryptographer, and my only piece of advice is: For the sake of god, don't use hash functions not designed for cryptographic security, if you need cryptographic security. It's that simple.