mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 17:10:35 +00:00
" The current printout is has multiple problems: * It is segregated by state, each having its own sorting criteria; * Number of permits and count resources is collapsed in to a single column, not clear which is the one printed. * Number of available/initial units of the semaphore are not printed; This series solves all this problems: * It merges all states into a single table, sorted by memory consumption, in descending order. * It separates number of permits and count resources into separate columns. * Prints a summary of the semaphore units. * Provides a cap on the maximum amount of printable lines, to not blow up the logs. The goal of all this is to make it easy to find the culprit a semaphore problem: easily spot the big memory consumers, then unpack the name column to determine which table and code path is responsible. This brings the printout close to the recently `scylla reads` scylla-gdb.py command, providing a uniform report format across the two tools. Example report: INFO 2021-05-07 09:52:16,806 [shard 0] testlog - With max-lines=4: Semaphore reader_concurrency_semaphore_dump_reader_diganostics with 8/2147483647 count and 263599186/9223372036854775807 memory resources: user request, dumping permit diagnostics: permits count memory table/description/state 7 2 77M ks.tbl1/op1/active 6 3 59M ks.tbl1/op0/active 4 0 36M ks.tbl1/op2/active 3 1 36M ks.tbl0/op2/active 11 2 43M permits omitted for brevity 31 8 251M total " * 'reader-concurrency-semaphore-dump-improvement/v1' of https://github.com/denesb/scylla: test: reader_concurrency_test: add reader_concurrency_semaphore_dump_reader_diganostics reader_concurrency_semaphore: dump_reader_diagnostics(): print more information in the header reader_concurrency_semaphore: dump_reader_diagnostics(): cap number of printed lines reader_concurrency_semaphore: dump_reader_diagnostics(): sort lines in descending order reader_concurrency_semaphore: dump_reader_diagnostics(): merge all states into a single table reader_concurrency_semaphore: dump_reader_diagnostics(): separate number of permits and count resources