1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-05-08 04:59:37 +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
Dieser Commit ist enthalten in:
Zygo Blaxell
2016-12-11 13:21:52 -05:00
Ursprung 77c11bb90f
Commit ec9d4a1d15
+1 -1
Datei anzeigen
@@ -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);