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

issue: 3782717 Improve Fairness for NGINX High Concurrency #224

Open
wants to merge 9 commits into
base: vNext
Choose a base branch
from

Conversation

pasis
Copy link
Member

@pasis pasis commented Aug 29, 2024

Description

This is set of commit from the fairness activity. They're quality improvements that help in multi process statistics analysis and running XLIO on the client side on a big scale.

What

Quality improvements.

Why ?

Improvements and benchmark scenarios analysis.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@pasis pasis added the draft Not to review yet label Aug 29, 2024
@pasis pasis added documentation Improvements or additions to documentation enhancement New feature or request and removed draft Not to review yet labels Sep 11, 2024
Some lines are unreasonably long in README. This can complicate reading
in a small terminal window. In cases where formatting doesn't matter,
limit the lines similarly to surrounding text (either 80 or 100
symbols).

README doesn't have strict convention, so keep it just tidy for now.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Keep consistent logs format.

Signed-off-by: Dmytro Podgornyi <[email protected]>
The option affects both xlio_stats and XLIO_STATS_FILE now and only
xlio_stats is limited by a hardcoded upper limit.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Reduce in_protocol_t size from default 4-byte enum to uint16_t.

in_protocol_t represents several values and doesn't have to be 4 bytes
in size. Reducing it to 2 bytes allows to utilize flow_tuple layout more
efficiently.

This also reduces sockinfo and use_family_rule size.

Signed-off-by: Dmytro Podgornyi <[email protected]>
XLIO has a feature to create files with the process PID in the name.
For example, /tmp/xlio-%d.txt. However, the stats file is created once
in the library constructor and shared between all the child processes.

Re-open the stats file in the child processes in case of a per-process
file name. This allows to save stats for each process in a separate
file and avoid content corruption due to concurrent writes.

Signed-off-by: Dmytro Podgornyi <[email protected]>
There are scenarios when we want to skip TX polling in the TX path. For
example, XLIO Socket API aims to trigger all/most of the events in the
polling context. TX polling in the TX path can lead to a completion
event from a flush context.

Avoid TX polling in the TX path if the flag XLIO_TX_SKIP_POLL is set.

Signed-off-by: Dmytro Podgornyi <[email protected]>
XLIO Socket API doesn't use epoll and epfd per socket. Therefore, such
an epfd is a waste of an open fd per socket. Linux kernel has hardcoded
limit of 1M open fds per process.

Close the epfd once we know that the socket is an extra API socket, so
we can raise the upper sockets limit from 500K to 1M per process.

Future direction is to avoid extra epfd open/close actions per socket.

Signed-off-by: Dmytro Podgornyi <[email protected]>
This call allows to change the callbacks in runtime. It must be
serialized with the group and the sockets activities.

Signed-off-by: Dmytro Podgornyi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request to_merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants