Replies: 5 comments 9 replies
-
I like the idea in general. Please, consider my remarks below.
The
All the configuration parameters and metrics in tarantool that are about a size of data are in bytes (not kilo-, mega-, giga-, etc).
I would like to discuss an API. I guess that the general statistics about a process will be in some
At first, it seems to be about a memory (amount of bytes), not VMAs. I wrote the next points in this context. I would like to know, what exactly is counted in
Maybe it worth to track
At first, it seems that we use two pretty orthogonal property sets here. The first one is a status: tarantool> fiber.stat().by_status
- total: 42
running: 1
suspended: 40
dead: 1 Next, the second property set is from where (from which pool) the fiber comes. tarantool> fiber.stat().by_pool
- total: 42
tx_pool: 0
iproto_pool: 20 How Next, system/non-system fits bad here. But since amount of system fibers is likely limited by some constent like 5 or 10, I think we can just ignore this property. Also, it is interesting, how many active fibers are in each pool. So we possibly want some more flexible API to filter and group the given properties. tarantool> fiber.stat({
> filter = {'status', '!=', 'dead'},
> group_by = 'pool'})
- total: 41
tx_pool: 0
iproto_pool: 10 |
Beta Was this translation helpful? Give feedback.
-
local fs = fiber.stat([opts])
{
by_status = {
total = 200,
running = 180,
suspended = 10,
dead = 10,
},
by_pool = {
total = 200,
iproto_pool = 8,
tx_pool = 2,
},
memory = {
stacks_bytes = 104857000,
structs_bytes = 8192,
},
-- fs.metrics we are just pulling up existing counters from the metrics module
metrics = {
amount = ...,
memused = ...,
memalloc = ...,
csw = ...,
},
} I'd prefer to group stats semantically and not by source (like {
total = 200,
running = 100,
suspended = 100,
dead = 1,
csw = 23513515,
stack_allocated = 12513531451,
stack_used = 1234514,
region_allocated = 123451243,
region_used = 3251324,
mem_bookkeeping = 33242143,
pool = {
iproto = {
total = 10,
running = 2,
suspended = 2,
idle = 2,
},
tx = {
total = 9,
running = 2,
suspended = 2,
idle = 3,
},
},
} In more details:
Previous
{
vmem = {
total_bytes = <number>,
rss_bytes = <number>,
vma_count = <number>,
max_map_count = <number>,
},
} I'd prefer: {
vmem = 1234124,
rss = 12342143,
vmem_maps = 12341234,
vmem_maps_max = 70870897,
} It is different from linux names but more consitent. Also I'd not sure we need extra nesting |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
You say:
And later you show Lua API (
If the second path is chosen, please show the new error message. |
Beta Was this translation helpful? Give feedback.
-
I'm OK with the proposal. Thank you for working on it! If you're going to elaborate it further, please, add a changelog section into the document. It helps to recap the discussion after a delay. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reviewers
Tickets
core: fibers engine backpressure #10169
Goal
Past discussion of this tickets
In the initial implementation, it was decided not to set a limit on the number of fibers.
Instead of imposing a strict limit on the number of fibers, which can lead to a violation of acceptable workloads, we propose to simplify the failure path by issuing a single diagnostic error with wide formatting.
Thanks to this change, a single error log line allows you to instantly get a clear and accurate error.
Diagnostic Information
1) Process-wide memory stats
/proc/self/statm
; macOS:task_info.virtual_size
)./proc/self/maps
)./proc/sys/vm/max_map_count
).2) Fiber statistics
stack_size * total
).region_total()
).region_used()
).vmem_structs
).Proposed Lua API
Error message
When fiber distribution fails, emit a single concise log line:
Beta Was this translation helpful? Give feedback.
All reactions