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

reactor, linux-aio: advise users in more detail on setting aio-max-nr #2396

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

lersek
Copy link
Member

@lersek lersek commented Aug 21, 2024

Print a table of the AIO counts we intend to use (at "debug" level).

If the intended counts cannot be allocated, reduce the network AIO count like before, but now also print an updated table (as a warning). Tell the user the specific number they should write to /proc/sys/fs/aio-max-nr for avoiding the reduction (assuming their current "aio-nr" does not change).

If the per CPU network AIO count would have to be reduced under 1, format a clear error message with (up to) four specific recommendations:

  • aio-max-nr value for reaching 1 network AIOCB per CPU (always printed),
  • aio-max-nr value for reaching the originally requested network AIOCB per CPU (always printed),
  • the highest value to reduce the application's CPU count to, in order to reach 1 network AIOCB per CPU, within the current (aio-max-nr - aio-nr) budget (printed only if this SMP count is at least 1),
  • the value to reduce the application's CPU count to, in order to reach the originally requested network AIOCB per CPU, within the current (aio-max-nr - aio-nr) budget (printed only if this SMP count is at least 1).

Motivated by scylladb/scylladb#5981.

@lersek
Copy link
Member Author

lersek commented Aug 21, 2024

Some example outputs, through scylla (all wrapped here manually, for readability):

  • aio-max-nr=32768, --smp=8. This example shows a workable startup, which, however, requires auto-reducing the network AIOCB count.

    INFO  2024-08-21 23:43:33,475 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:43:33,475 seastar -
    INFO  2024-08-21 23:43:33,475 seastar - purpose  per cpu  all 8 cpus
    INFO  2024-08-21 23:43:33,475 seastar - -------  -------  ----------
    INFO  2024-08-21 23:43:33,475 seastar - storage     1024        8192
    INFO  2024-08-21 23:43:33,475 seastar - preempt        2          16
    INFO  2024-08-21 23:43:33,475 seastar - network    50000      400000
    INFO  2024-08-21 23:43:33,475 seastar - -------  -------  ----------
    INFO  2024-08-21 23:43:33,475 seastar - total      51026      408208
    INFO  2024-08-21 23:43:33,475 seastar -
    INFO  2024-08-21 23:43:33,475 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 32768 - 0 = 32768
    WARN  2024-08-21 23:43:33,475 seastar - Your system does not have enough AIO capacity
                                            for optimal network performance; reducing
                                            `max-networking-io-control-blocks'.
    WARN  2024-08-21 23:43:33,475 seastar - Resultant AIO control block usage:
    WARN  2024-08-21 23:43:33,475 seastar -
    WARN  2024-08-21 23:43:33,475 seastar - purpose  per cpu  all 8 cpus
    WARN  2024-08-21 23:43:33,475 seastar - -------  -------  ----------
    WARN  2024-08-21 23:43:33,475 seastar - storage     1024        8192
    WARN  2024-08-21 23:43:33,475 seastar - preempt        2          16
    WARN  2024-08-21 23:43:33,475 seastar - network     3070       24560
    WARN  2024-08-21 23:43:33,475 seastar - -------  -------  ----------
    WARN  2024-08-21 23:43:33,475 seastar - total       4096       32768
    WARN  2024-08-21 23:43:33,475 seastar -
    WARN  2024-08-21 23:43:33,475 seastar - For optimal network performance, set
                                            /proc/sys/fs/aio-max-nr to at least 408208.
    
  • aio-max-nr=408208 (raised as advised above), --smp=8 -- everything's fine.

    INFO  2024-08-21 23:47:50,887 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:47:50,887 seastar -
    INFO  2024-08-21 23:47:50,887 seastar - purpose  per cpu  all 8 cpus
    INFO  2024-08-21 23:47:50,887 seastar - -------  -------  ----------
    INFO  2024-08-21 23:47:50,887 seastar - storage     1024        8192
    INFO  2024-08-21 23:47:50,887 seastar - preempt        2          16
    INFO  2024-08-21 23:47:50,887 seastar - network    50000      400000
    INFO  2024-08-21 23:47:50,887 seastar - -------  -------  ----------
    INFO  2024-08-21 23:47:50,887 seastar - total      51026      408208
    INFO  2024-08-21 23:47:50,887 seastar -
    INFO  2024-08-21 23:47:50,887 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 408208 - 0 = 408208
    
  • aio-max-nr=1024, --smp=8. This example shows an unacceptably low aio-max-nr setting (per-CPU network AIO count would be smaller than 1); see the exception thrown.

    INFO  2024-08-21 23:49:16,364 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:49:16,364 seastar -
    INFO  2024-08-21 23:49:16,364 seastar - purpose  per cpu  all 8 cpus
    INFO  2024-08-21 23:49:16,364 seastar - -------  -------  ----------
    INFO  2024-08-21 23:49:16,364 seastar - storage     1024        8192
    INFO  2024-08-21 23:49:16,364 seastar - preempt        2          16
    INFO  2024-08-21 23:49:16,364 seastar - network    50000      400000
    INFO  2024-08-21 23:49:16,364 seastar - -------  -------  ----------
    INFO  2024-08-21 23:49:16,364 seastar - total      51026      408208
    INFO  2024-08-21 23:49:16,364 seastar -
    INFO  2024-08-21 23:49:16,364 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 1024 - 0 = 1024
    Could not initialize seastar: std::runtime_error (Your system does not satisfy minimum
    AIO requirements. Set /proc/sys/fs/aio-max-nr to at least 8216 (minimum) or 408208
    (recommended for networking performance).)
    
  • aio-max-nr=8216 (the minimum advised above), --smp=8 -- now we can reach 1/CPU network AIO:

    INFO  2024-08-21 23:50:29,874 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:50:29,874 seastar -
    INFO  2024-08-21 23:50:29,874 seastar - purpose  per cpu  all 8 cpus
    INFO  2024-08-21 23:50:29,874 seastar - -------  -------  ----------
    INFO  2024-08-21 23:50:29,874 seastar - storage     1024        8192
    INFO  2024-08-21 23:50:29,874 seastar - preempt        2          16
    INFO  2024-08-21 23:50:29,874 seastar - network    50000      400000
    INFO  2024-08-21 23:50:29,874 seastar - -------  -------  ----------
    INFO  2024-08-21 23:50:29,874 seastar - total      51026      408208
    INFO  2024-08-21 23:50:29,874 seastar -
    INFO  2024-08-21 23:50:29,874 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 8216 - 0 = 8216
    WARN  2024-08-21 23:50:29,874 seastar - Your system does not have enough AIO capacity
                                            for optimal network performance; reducing
                                            `max-networking-io-control-blocks'.
    WARN  2024-08-21 23:50:29,874 seastar - Resultant AIO control block usage:
    WARN  2024-08-21 23:50:29,874 seastar -
    WARN  2024-08-21 23:50:29,874 seastar - purpose  per cpu  all 8 cpus
    WARN  2024-08-21 23:50:29,874 seastar - -------  -------  ----------
    WARN  2024-08-21 23:50:29,874 seastar - storage     1024        8192
    WARN  2024-08-21 23:50:29,874 seastar - preempt        2          16
    WARN  2024-08-21 23:50:29,874 seastar - network        1           8
    WARN  2024-08-21 23:50:29,874 seastar - -------  -------  ----------
    WARN  2024-08-21 23:50:29,874 seastar - total       1027        8216
    WARN  2024-08-21 23:50:29,874 seastar -
    WARN  2024-08-21 23:50:29,874 seastar - For optimal network performance, set
                                            /proc/sys/fs/aio-max-nr to at least 408208.
    
  • aio-max-nr=4096, --smp=4. Another hard failure, but in this case we can also sensibly recommend reducing the CPU count:

    INFO  2024-08-21 23:52:10,885 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:52:10,885 seastar -
    INFO  2024-08-21 23:52:10,885 seastar - purpose  per cpu  all 4 cpus
    INFO  2024-08-21 23:52:10,885 seastar - -------  -------  ----------
    INFO  2024-08-21 23:52:10,885 seastar - storage     1024        4096
    INFO  2024-08-21 23:52:10,885 seastar - preempt        2           8
    INFO  2024-08-21 23:52:10,885 seastar - network    50000      200000
    INFO  2024-08-21 23:52:10,885 seastar - -------  -------  ----------
    INFO  2024-08-21 23:52:10,885 seastar - total      51026      204104
    INFO  2024-08-21 23:52:10,885 seastar -
    INFO  2024-08-21 23:52:10,885 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 4096 - 0 = 4096
    Could not initialize seastar: std::runtime_error (Your system does not satisfy minimum
    AIO requirements. Set /proc/sys/fs/aio-max-nr to at least 4108 (minimum) or 204104
    (recommended for networking performance), or decrease the logical CPU count of the
    application to 3 (maximum).)
    
  • aio-max-nr=4096, --smp=3 (reduced as advised above) -- we do start up:

    INFO  2024-08-21 23:53:05,726 seastar - Intended AIO control block usage:
    INFO  2024-08-21 23:53:05,726 seastar -
    INFO  2024-08-21 23:53:05,726 seastar - purpose  per cpu  all 3 cpus
    INFO  2024-08-21 23:53:05,726 seastar - -------  -------  ----------
    INFO  2024-08-21 23:53:05,726 seastar - storage     1024        3072
    INFO  2024-08-21 23:53:05,726 seastar - preempt        2           6
    INFO  2024-08-21 23:53:05,726 seastar - network    50000      150000
    INFO  2024-08-21 23:53:05,726 seastar - -------  -------  ----------
    INFO  2024-08-21 23:53:05,726 seastar - total      51026      153078
    INFO  2024-08-21 23:53:05,726 seastar -
    INFO  2024-08-21 23:53:05,726 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 4096 - 0 = 4096
    WARN  2024-08-21 23:53:05,726 seastar - Your system does not have enough AIO capacity
                                            for optimal network performance; reducing
                                            `max-networking-io-control-blocks'.
    WARN  2024-08-21 23:53:05,726 seastar - Resultant AIO control block usage:
    WARN  2024-08-21 23:53:05,726 seastar -
    WARN  2024-08-21 23:53:05,726 seastar - purpose  per cpu  all 3 cpus
    WARN  2024-08-21 23:53:05,726 seastar - -------  -------  ----------
    WARN  2024-08-21 23:53:05,726 seastar - storage     1024        3072
    WARN  2024-08-21 23:53:05,726 seastar - preempt        2           6
    WARN  2024-08-21 23:53:05,726 seastar - network      339        1017
    WARN  2024-08-21 23:53:05,726 seastar - -------  -------  ----------
    WARN  2024-08-21 23:53:05,726 seastar - total       1365        4095
    WARN  2024-08-21 23:53:05,726 seastar -
    WARN  2024-08-21 23:53:05,726 seastar - For optimal network performance, set
                                            /proc/sys/fs/aio-max-nr to at least 153078.
    
  • The next three examples are a bit convoluted. We start with aio-max-nr=2054, --smp=1029, and --max-networking-io-control-blocks=15. This example shows that the last branch of the patch can be triggered (although constructing a reproducer for it takes a bit of calculation, and a large machine). Note that we now offer two CPU count recommendations.

    INFO  2024-08-22 00:08:55,010 seastar - Intended AIO control block usage:
    INFO  2024-08-22 00:08:55,010 seastar -
    INFO  2024-08-22 00:08:55,010 seastar - purpose  per cpu  all 1029 cpus
    INFO  2024-08-22 00:08:55,010 seastar - -------  -------  -------------
    INFO  2024-08-22 00:08:55,010 seastar - storage     1024        1053696
    INFO  2024-08-22 00:08:55,010 seastar - preempt        2           2058
    INFO  2024-08-22 00:08:55,010 seastar - network       15          15435
    INFO  2024-08-22 00:08:55,010 seastar - -------  -------  -------------
    INFO  2024-08-22 00:08:55,010 seastar - total       1041        1071189
    INFO  2024-08-22 00:08:55,010 seastar -
    INFO  2024-08-22 00:08:55,010 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 2054 - 0 = 2054
    Could not initialize seastar: std::runtime_error (Your system does not satisfy minimum
    AIO requirements. Set /proc/sys/fs/aio-max-nr to at least 1056783 (minimum) or 1071189
    (recommended for networking performance), or decrease the logical CPU count of the
    application to 2 (maximum) or 1 (recommended for networking performance).)
    
  • aio-max-nr=2054, --smp=2 (reduced as advised above, option 1), and --max-networking-io-control-blocks=15 -- we do start up:

    INFO  2024-08-22 00:10:33,679 seastar - Intended AIO control block usage:
    INFO  2024-08-22 00:10:33,679 seastar -
    INFO  2024-08-22 00:10:33,679 seastar - purpose  per cpu  all 2 cpus
    INFO  2024-08-22 00:10:33,679 seastar - -------  -------  ----------
    INFO  2024-08-22 00:10:33,679 seastar - storage     1024        2048
    INFO  2024-08-22 00:10:33,679 seastar - preempt        2           4
    INFO  2024-08-22 00:10:33,679 seastar - network       15          30
    INFO  2024-08-22 00:10:33,679 seastar - -------  -------  ----------
    INFO  2024-08-22 00:10:33,679 seastar - total       1041        2082
    INFO  2024-08-22 00:10:33,679 seastar -
    INFO  2024-08-22 00:10:33,679 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 2054 - 0 = 2054
    WARN  2024-08-22 00:10:33,679 seastar - Your system does not have enough AIO capacity
                                            for optimal network performance; reducing
                                            `max-networking-io-control-blocks'.
    WARN  2024-08-22 00:10:33,679 seastar - Resultant AIO control block usage:
    WARN  2024-08-22 00:10:33,679 seastar -
    WARN  2024-08-22 00:10:33,679 seastar - purpose  per cpu  all 2 cpus
    WARN  2024-08-22 00:10:33,679 seastar - -------  -------  ----------
    WARN  2024-08-22 00:10:33,679 seastar - storage     1024        2048
    WARN  2024-08-22 00:10:33,679 seastar - preempt        2           4
    WARN  2024-08-22 00:10:33,679 seastar - network        1           2
    WARN  2024-08-22 00:10:33,679 seastar - -------  -------  ----------
    WARN  2024-08-22 00:10:33,679 seastar - total       1027        2054
    WARN  2024-08-22 00:10:33,679 seastar -
    WARN  2024-08-22 00:10:33,679 seastar - For optimal network performance, set
                                            /proc/sys/fs/aio-max-nr to at least 2082.
    
  • aio-max-nr=2054, --smp=1 (reduced as advised above, option 2), and --max-networking-io-control-blocks=15 -- we do start up, and note that the requested --max-networking-io-control-blocks=15 is now reached, hence no warnings:

    INFO  2024-08-22 00:10:47,366 seastar - Intended AIO control block usage:
    INFO  2024-08-22 00:10:47,366 seastar -
    INFO  2024-08-22 00:10:47,366 seastar - purpose  per cpu  all 1 cpus
    INFO  2024-08-22 00:10:47,366 seastar - -------  -------  ----------
    INFO  2024-08-22 00:10:47,366 seastar - storage     1024        1024
    INFO  2024-08-22 00:10:47,366 seastar - preempt        2           2
    INFO  2024-08-22 00:10:47,366 seastar - network       15          15
    INFO  2024-08-22 00:10:47,366 seastar - -------  -------  ----------
    INFO  2024-08-22 00:10:47,366 seastar - total       1041        1041
    INFO  2024-08-22 00:10:47,366 seastar -
    INFO  2024-08-22 00:10:47,366 seastar - Available AIO control blocks =
                                            aio-max-nr - aio-nr = 2054 - 0 = 2054
    

@lersek lersek self-assigned this Aug 21, 2024
@tchaikov
Copy link
Contributor

i will take a look at this PR tomorrow.

seastar_logger.info("");
log_aiocbs(log_level::info, storage_iocbs, preempt_iocbs, network_iocbs);
seastar_logger.info("");
seastar_logger.info("Available AIO control blocks = aio-max-nr - aio-nr = {} - {} = {}", aio_max_nr, aio_nr, available_aio);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default logging level is set to info, which ensures this message is always printed. i am wondering if we need this logging message if the number of aio cb is large enough. because i think, "no news is good news", which potentially reduces unnecessary verbosity.

so, maybe we can print it only when the number of aio cb is not sufficient and might hurt the network effienciency of the seastar application or it is not large enough to fulfill the minimum requirement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov

This patch (for seastar code) is also supposed to replace the following passage in scylladb's docs/dev/docker-hub.md (as of scylladb commit ff52527c54e8):

-Using multiple cores requires setting a proper value to the `/proc/sys/fs/aio-max-nr`.
-On many non-production systems, it will be equal to 65K. The formula
-to calculate the proper value is:
-
-    Available AIO on the system - (request AIO per-cpu * ncpus) =
-    aio_max_nr - aio_nr < (reactor::max_aio + detect_aio_poll + reactor_backend_aio::max_polls) * cpu_cores =
-    aio_max_nr - aio_nr < (1024 + 2 + 10000) * cpu_cores =
-    aio_max_nr - aio_nr < 11026 * cpu_cores
-
-    where
-
-    reactor::max_aio = max_aio_per_queue * max_queues,
-    max_aio_per_queue = 128,
-    max_queues = 8.
-

(See here why -- it's just too stale, and seeing actual numbers is better than purely symbolic formulae.)

Given that the static documentation is going away, I believe that the basic info should be printed even if the resources prove sufficint. However, I do agree that seeing this message at every startup, with default log level configuration, becomes boring pretty fast. I suggest: downgrade the log level from info to verbose. Would that work for you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lersek that'd work. thanks!

Copy link
Member Author

@lersek lersek Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: the log level just below info is debug, not verbose (I remembered verbose from another project, sorry). ... that is, I'm going to change the log level to debug.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in v2

Print a table of the AIO counts we intend to use (at "debug" level).

If the intended counts cannot be allocated, reduce the network AIO count
like before, but now also print an updated table (as a warning). Tell the
user the specific number they should write to "/proc/sys/fs/aio-max-nr"
for avoiding the reduction (assuming their current "aio-nr" does not
change).

If the per CPU network AIO count would have to be reduced under 1, format
a clear error message with (up to) four specific recommendations:

- aio-max-nr value for reaching 1 network AIOCB per CPU (always printed),

- aio-max-nr value for reaching the originally requested network AIOCB per
  CPU (always printed),

- the highest value to reduce the application's CPU count to, in order to
  reach 1 network AIOCB per CPU, within the current (aio-max-nr - aio-nr)
  budget (printed only if this SMP count is at least 1),

- the value to reduce the application's CPU count to, in order to reach
  the originally requested network AIOCB per CPU, within the current
  (aio-max-nr - aio-nr) budget (printed only if this SMP count is at least
  1).

Motivated by <scylladb/scylladb#5981>.

Signed-off-by: Laszlo Ersek <[email protected]>
@lersek
Copy link
Member Author

lersek commented Aug 27, 2024

v2:

  • downgrade table of intended AIO counts from info level to debug [Kefu @tchaikov]

example output (pass --logger-log-level seastar=debug to scylla):

DEBUG 2024-08-27 14:00:08,837 seastar - Intended AIO control block usage:
DEBUG 2024-08-27 14:00:08,837 seastar - 
DEBUG 2024-08-27 14:00:08,837 seastar - purpose  per cpu  all 1 cpus
DEBUG 2024-08-27 14:00:08,837 seastar - -------  -------  ----------
DEBUG 2024-08-27 14:00:08,837 seastar - storage     1024        1024
DEBUG 2024-08-27 14:00:08,837 seastar - preempt        2           2
DEBUG 2024-08-27 14:00:08,837 seastar - network    50000       50000
DEBUG 2024-08-27 14:00:08,837 seastar - -------  -------  ----------
DEBUG 2024-08-27 14:00:08,837 seastar - total      51026       51026
DEBUG 2024-08-27 14:00:08,837 seastar - 
DEBUG 2024-08-27 14:00:08,837 seastar - Available AIO control blocks = aio-max-nr - aio-nr = 1048576 - 0 = 1048576

Copy link
Contributor

@tchaikov tchaikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@avikivity avikivity merged commit ec5da7a into scylladb:master Aug 27, 2024
14 checks passed
@lersek lersek deleted the gh-5981 branch August 27, 2024 13:24
lersek added a commit to lersek/scylla that referenced this pull request Sep 2, 2024
What we have today in "docs/dev/docker-hub.md" on "aio-max-nr" dates back
to scylla commit f441202 ("docs/docker-hub.md: add quickstart section
with --smp 1", 2020-09-22). Problems with the current language:

- The "65K" claim as default value on non-production systems is wrong;
  "fs/aio.c" in Linux initializes "aio_max_nr" to 0x10000, which is 64K.

- The section in question uses equal signs (=) incorrectly. The intent was
  probably to say "which means the same as", but that's not what equality
  means.

- In the same section, the relational operator "<" is bogus. The available
  AIO count must be at least as high (>=) as the requested AIO count.

- Clearer names should be used;
  adjust_max_networking_aio_io_control_blocks() in "src/core/reactor.cc"
  sets a great example:

  - "reactor::max_aio" should be called "storage_iocbs";

  - "detect_aio_poll" should be called "preempt_iocbs";

  - "reactor_backend_aio::max_polls" should be called "network_iocbs";

- The specific value 10000 for the last one ("network_iocbs") is not
  correct in scylla's context. It is correct as the Seastar default, but
  scylla has used 50000 since commit 2cfc517 ("main, test: adjust
  number of networking iocbs", 2021-07-18).

Rewrite the section to address these problems.

See also:
- scylladb#5981
- scylladb/seastar#2396
- scylladb#19921

Signed-off-by: Laszlo Ersek <[email protected]>
lersek added a commit to lersek/scylla that referenced this pull request Sep 2, 2024
What we have today in "docs/dev/docker-hub.md" on "aio-max-nr" dates back
to scylla commit f441202 ("docs/docker-hub.md: add quickstart section
with --smp 1", 2020-09-22). Problems with the current language:

- The "65K" claim as default value on non-production systems is wrong;
  "fs/aio.c" in Linux initializes "aio_max_nr" to 0x10000, which is 64K.

- The section in question uses equal signs (=) incorrectly. The intent was
  probably to say "which means the same as", but that's not what equality
  means.

- In the same section, the relational operator "<" is bogus. The available
  AIO count must be at least as high (>=) as the requested AIO count.

- Clearer names should be used;
  adjust_max_networking_aio_io_control_blocks() in "src/core/reactor.cc"
  sets a great example:

  - "reactor::max_aio" should be called "storage_iocbs",

  - "detect_aio_poll" should be called "preempt_iocbs",

  - "reactor_backend_aio::max_polls" should be called "network_iocbs".

- The specific value 10000 for the last one ("network_iocbs") is not
  correct in scylla's context. It is correct as the Seastar default, but
  scylla has used 50000 since commit 2cfc517 ("main, test: adjust
  number of networking iocbs", 2021-07-18).

Rewrite the section to address these problems.

See also:
- scylladb#5981
- scylladb/seastar#2396
- scylladb#19921

Signed-off-by: Laszlo Ersek <[email protected]>
avikivity added a commit to scylladb/scylladb that referenced this pull request Sep 9, 2024
…aszlo Ersek

~~~
What we have today in "docs/dev/docker-hub.md" on "aio-max-nr" dates back
to scylla commit f441202 ("docs/docker-hub.md: add quickstart section
with --smp 1", 2020-09-22). Problems with the current language:

- The "65K" claim as default value on non-production systems is wrong;
  "fs/aio.c" in Linux initializes "aio_max_nr" to 0x10000, which is 64K.

- The section in question uses equal signs (=) incorrectly. The intent was
  probably to say "which means the same as", but that's not what equality
  means.

- In the same section, the relational operator "<" is bogus. The available
  AIO count must be at least as high (>=) as the requested AIO count.

- Clearer names should be used;
  adjust_max_networking_aio_io_control_blocks() in "src/core/reactor.cc"
  sets a great example:

  - "reactor::max_aio" should be called "storage_iocbs",

  - "detect_aio_poll" should be called "preempt_iocbs",

  - "reactor_backend_aio::max_polls" should be called "network_iocbs".

- The specific value 10000 for the last one ("network_iocbs") is not
  correct in scylla's context. It is correct as the Seastar default, but
  scylla has used 50000 since commit 2cfc517 ("main, test: adjust
  number of networking iocbs", 2021-07-18).

Rewrite the section to address these problems.

See also:
- #5981
- scylladb/seastar#2396
- #19921

Signed-off-by: Laszlo Ersek <[email protected]>
~~~

No need for backporting; the documentation being refreshed targets developers as audience, not end-users.

Closes #20398

* github.com:scylladb/scylladb:
  docs/dev/docker-hub.md: refresh aio-max-nr calculation
  docs/dev/docker-hub.md: strip trailing whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants