-
Notifications
You must be signed in to change notification settings - Fork 97
Increase BUFFER_SIZE #359
Copy link
Copy link
Open
Labels
RFERequest For Enhancement (as opposed to a bug)Request For Enhancement (as opposed to a bug)TriagedSomeone on the DNF 5 team has read the issue and determined the next steps to takeSomeone on the DNF 5 team has read the issue and determined the next steps to take
Metadata
Metadata
Assignees
Labels
RFERequest For Enhancement (as opposed to a bug)Request For Enhancement (as opposed to a bug)TriagedSomeone on the DNF 5 team has read the issue and determined the next steps to takeSomeone on the DNF 5 team has read the issue and determined the next steps to take
When reading from disk, lr_checksum_fd does so in chunks of 2kB, while modern disks usually have 4kB, ZFS has 128k and NFS mounts have 1 MB and page sizes are 4 kB and more. I think 256 kB would speed it up quite a lot.
However, I'm not sure if
librepo/checksum.c:40:#define BUFFER_SIZE 2048
is the only line that needs to be changed, there are other lines where a buffer of 2048 bytes appears out of nowhere:
librepo/util.c:314: const int bufsize = 2048;
tests/test_repoconf.c:41: char array[2048];