Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce and handle EAGAIN errors on AIO label reads #16551

Merged
merged 1 commit into from
Sep 21, 2024

Commits on Sep 19, 2024

  1. Reduce and handle EAGAIN errors on AIO label reads

    At least FreeBSD has a limit of 256 simultaneous AIO requests per
    process. Attempt to issue more results in EAGAIN errors. Since we
    issue 4 requests per disk/partition from 2xCPUs threads, it is
    quite easy to reach that limit on large systems, that results in
    random pool import failures.  It annoyed me for quite a while on
    a system with 64 CPUs and 70+ partitioned disks.
    
    This patch from one side limits the number of threads to avoid the
    error, while from another should softly fall back to sync reads in
    case of error.  It takes into account _SC_AIO_MAX as a system-wide
    AIO limit and _SC_AIO_LISTIO_MAX as a closest value to per-process
    limit.  The last not exactly right, but it is the best I found.
    
    Signed-off-by:	Alexander Motin <[email protected]>
    Sponsored by:	iXsystems, Inc.
    amotin committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    b60db7b View commit details
    Browse the repository at this point in the history