Commit 5e374a8
authored
[rust/rqd] Add option to measure proc memory using PSS (#2089)
Overview
Add a configuration option to RQD to choose between RSS (Resident Set
Size) and PSS (Proportional Set Size) for measuring process memory usage
on Linux systems.
**Current State:**
- RQD measures memory using RSS from `/proc/[pid]/statm`
- RSS counts shared libraries fully for each process, leading to
inflated memory reports
- PSS divides shared memory proportionally among processes, providing
more accurate measurements
**Key Differences:** - **RSS**: Total physical memory including full
count of shared libraries (can be misleading)
- **PSS**: Proportional share - shared pages divided by number of
processes sharing them (more accurate)
- **Source**: `/proc/[pid]/smaps_rollup` (Linux kernel 4.14+) provides
pre-summed PSS values1 parent 89ddcaf commit 5e374a8
File tree
4 files changed
+86
-8
lines changed- rust
- config
- crates/rqd/src
- config
- system
4 files changed
+86
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
143 | 161 | | |
144 | 162 | | |
145 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| 101 | + | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
| |||
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| 125 | + | |
116 | 126 | | |
117 | 127 | | |
118 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| |||
562 | 567 | | |
563 | 568 | | |
564 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
565 | 599 | | |
566 | 600 | | |
567 | 601 | | |
| |||
603 | 637 | | |
604 | 638 | | |
605 | 639 | | |
606 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
607 | 644 | | |
608 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
609 | 662 | | |
610 | 663 | | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | 664 | | |
615 | 665 | | |
616 | 666 | | |
| |||
904 | 954 | | |
905 | 955 | | |
906 | 956 | | |
907 | | - | |
| 957 | + | |
908 | 958 | | |
909 | 959 | | |
910 | 960 | | |
| |||
0 commit comments