Skip to content

Increase BUFFER_SIZE #359

@gsabdiv

Description

@gsabdiv

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFERequest For Enhancement (as opposed to a bug)TriagedSomeone on the DNF 5 team has read the issue and determined the next steps to take

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions