-
Notifications
You must be signed in to change notification settings - Fork 842
Reduce the calls to ink_get_hrtime in the event loop #12602
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -383,6 +383,18 @@ Thread Variables | |
| will create its own domain socket with a ``-<thread id>`` suffix added to the | ||
| end of the path. | ||
|
|
||
| .. ts:cv:: CONFIG proxy.config.exec_thread.event_time_update_rate INT 10 | ||
|
|
||
| This dynamically loadable setting controls the rate that exec thread loop timestamps are | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this say "this dynamic reloadable" ? Or just "this reloadable" ? |
||
| updated after processing an event given as a percentage from 0 to 100. 0 | ||
| would mean the timestamp is only updated once per event loop, 100 percent | ||
| means the timestamp is updated after any potential operation that could take | ||
| time (i.e. processing an event or waiting on IO). The timestamp is used for | ||
| queuing events and comparing timestamps for processing. Updating more often | ||
| might improve event timer accuracy and event loop metrics, but increases the | ||
| number of times that the current time is obtained from the OS. See also | ||
| `proxy.config.system_clock` | ||
|
|
||
| .. ts:cv:: CONFIG proxy.config.accept_threads INT 1 | ||
|
|
||
| The number of accept threads. If disabled (``0``), then accepts will be done | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,9 @@ ink_event_system_init(ts::ModuleVersion v) | |
|
|
||
| RecEstablishStaticConfigInt32(thread_freelist_low_watermark, "proxy.config.allocator.thread_freelist_low_watermark"); | ||
|
|
||
| extern int event_time_update_rate; | ||
| RecEstablishStaticConfigInt32(event_time_update_rate, "proxy.config.exec_thread.event_time_update_rate"); | ||
|
||
|
|
||
| int chunk_sizes[DEFAULT_BUFFER_SIZES] = {0}; | ||
| { | ||
| auto chunk_sizes_string{RecGetRecordStringAlloc("proxy.config.allocator.iobuf_chunk_sizes")}; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of spelling out that this is reloadable etc., you should add