That memory amount should be more than enough. Can you try setting it to unlimited to discard any other problem? If that works, increase the current value until you don’t get that message and tell us such value please.
Well, 512 MB worked, as well as unlimited.
For people who run as a service in Linux you should add to your .service file
in the [Service] section:
LimitMEMLOCK=infinity
Even if 4096 * 1500 is definitely lower than 18MB, each registered buffer takes one page, which is 4KB, meaning 4096*4096=16MB plus some extra storage needed for the metadata ~= 18MB.
In the near future we’ll make the number of allocated buffers configurable.
NOTE 1: In a next PR we’ll print the current memlock limits when too low.
NOTE 2: The fact that zero copy is not enabled is not crucial. Most of the benefits of io_uring will apply regardless.
Thanks for the test. Maybe it was because of the total memory all workers needed? If you say 18 MB per worker, we use 1 worker per CPU core and we had 16 CPU cores, then 288 MB would be the total memory needed. After you add the printing of the limits, maybe the issue will become clearer. Thanks!