1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

crucible: fs: use a much smaller default search buffer size

It turns out we never use a value for m_buf_size that isn't the default,
and we also never ask for more than a few thousand items; however,
we do spend a ton of time memsetting the huge buffer to zero.

I don't know what the ideal size is, but 16K is a far better guess
than 1MB.  Let's reduce it for some immediate CPU benefit, and determine
what the size should be later.

Reported at https://github.com/Zygo/bees/issues/11
This commit is contained in:
Zygo Blaxell 2016-12-11 13:21:52 -05:00
parent 77c11bb90f
commit ec9d4a1d15

View File

@ -156,7 +156,7 @@ namespace crucible {
ostream & operator<<(ostream &os, const BtrfsIoctlSearchHeader &hdr);
struct BtrfsIoctlSearchKey : public btrfs_ioctl_search_key {
BtrfsIoctlSearchKey(size_t buf_size = 1024 * 1024);
BtrfsIoctlSearchKey(size_t buf_size = 16 * 1024);
virtual bool do_ioctl_nothrow(int fd);
virtual void do_ioctl(int fd);