4 ms·
Isn't anything that avoids too many syscalls and copying between userspace and kernel 35% faster? Including filesystems that run completely on user space (not
by nabla9 2y ago
Isn't anything that avoids too many syscalls and copying between userspace and kernel 35% faster? Including filesystems that run completely on user space (not FUSE, FUSE calls go trough kernel)
- ori_b 2y agoIn some ways, it seems surprising that avoiding open/read/write syscalls and caching in user space is only 35% faster.
- manmal 2y agoMy hypothesis is that the scenarios the SQLite team has setup don’t particularly exploit the fact that the SQLite metrics become more favorable the more files are accessed.
- ori_b 2y agoI took a look at the code, and the file based code is basically the worst case for the file system, accessing about as many files as it can. Additionally, it's doing a lot of unnecessary work. It's using buffered I/O to do a full file read, and throwing away the buffer immediately, which is an expensive way to add an unnecessary memcpy. It's opening by full path instead of openat, which incurs a path lookup penalty. I think the file based code can be quite a bit faster, if you put a bit of effort in. I think in serious use, the gap would narrow, not grow.