linuxram/measurements/expe003/readme.md

237 lines
47 KiB
Markdown
Raw Normal View History

## try to figure out a map from [text](src/sumfinder/simplification/treemap000.md)
# 14/08/2024
### map2
[^10] shows that <tmpfs> is also accounted in `Inactive(anon)` and `Inactive`, which leads me to think of an alternate segmentation (segmentation2)
```md
- 196498248 kB `MemTotal`
- 100883568 kB `Active`
- 38741516 kB `Active(anon)`
- 62142052 kB `Active(file)`
- 91970056 kB `Inactive`
- 26288040 kB `Inactive(anon)`
- 65682016 kB `Inactive(file)`
- 3644624 kB <unidentified-rest-2>
```
[^tmpfs_computation]: we know from [^8] and [^6] that `Cache` = `pagecache` + `tmpfs`. So in the case of [text](measurements/bug3897/alambix97/20240805-191606-meminfo.stdout):
`tmpfs` = `Cache` - `pagecache`
`tmpfs` = 127870960 kB - 127824068 kB
`tmpfs` = 46892 kB
note: we know from [^6] that `Shmem` = `tmpfs` + `shared-mem`. So in the case of [text](measurements/bug3897/alambix97/20240805-191606-meminfo.stdout), where `Shmem` = 68316 kB, we can check that `Shmem` > `tmpfs`, and therefore `shared-mem` has a positive value, which is reassuring.
### map3: MemTotal = Active + Inactive + KReclaimable + SwapCached + SUnreclaim + DirectMap4k + Buffers + Unevictable + Mlocked + KernelStack + Writeback + HardwareCorrupted
This equation (equation 21 from [[text](../expe001.5/simplification/treemap000.md)]) was randomly picked from sumfinder using [text](measurements/bug3897/alambix97/20240805-191606-meminfo.stdout).
```md
- 196498248 kB `MemTotal` (segmentation1)
- 100883568 kB `Active`
- 62142052 kB `Active(file)`
- 38741516 kB `Active(anon)`
- 91970056 kB `Inactive`
- 65682016 kB `Inactive(file)`
- 26288040 kB `Inactive(anon)`
- 1944992 kB `Slab`
- 1223464 kB `KReclaimable`
- 1223464 kB `SReclaimable`
- 0 kB <other-direct-allocations>
- 721528 kB `SUnreclaim`
- 1063208 kB `SwapCached`
- 541144 kB `DirectMap4k`
- 31232 kB `Buffers`
- 22480 kB `Unevictable`
- 19408 kB `Mlocked`
- 16688 kB `KernelStack`
- 5420 kB `Writeback`
- 52 kB `HardwareCorrupted`
```
check:
```py
>>> 196498248 - (100883568 + 91970056 + 1944992 + 1063208 + 541144 + 31232 + 22480 + 19408 + 16688 + 5420 + 52)
0
```
-> problem:where is MemFree (784240 kB) in this picture, as from [^11], MemFree is on physical ram ?
### map4
choose another equation from [text](measurements/bug3897/alambix97/20240805-191606-meminfo.stdout).
#### simplification 1
-> filter equations with MemTotal =
-> removed equations without MemFree
-> removed equations without SwapCached
1. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
3. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
2. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
4. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
11. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
13. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
12. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
14. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + KReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
23. MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted
24. MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + KReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted
#### simplification 2
-> removed doublons equations with KReclaimable because KReclaimable=SReclaimable and KReclaimable is supposed to contain SReclaimable
1. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
2. MemTotal = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
11. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
12. MemTotal = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim + DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
23. MemTotal = Cached + SwapTotal + Inactive(anon) + DirectMap2M + SReclaimable + SwapCached + MemFree + DirectMap4k + PageTables + Percpu + KernelStack + Writeback + HardwareCorrupted
#### simplification 3
-> removed equation 23 because it contains SwapTotal
1. MemTotal = Group3 + Group1
2. MemTotal = Group3 + Group2
11. MemTotal = Group4 + Group1
12. MemTotal = Group4 + Group2
with:
Group1 = VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
Group2 = DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
Group1 = Group2
Group3 = Active(file) + AnonHugePages + Active(anon) + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim
Group4 = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim
Group3 = Group4
#### simplification 4
-> to simplify, removed Group3 because Group3 = Group4 is expected because Active = Active(file) + Active(anon)
This leaves us with
11. MemTotal = Group4 + Group1
12. MemTotal = Group4 + Group2
with:
Group1 = VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
Group2 = DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
Group1 = Group2
Group4 = Active + AnonHugePages + Inactive(anon) + Dirty + DirectMap2M + Slab + SReclaimable + SwapCached + MemFree + SUnreclaim
#### simplification 5
-> compare Group1 and Group2
Group1 = VmallocUsed + PageTables + Percpu + Mapped + Buffers + Mlocked + Writeback + Hugepagesize + HardwareCorrupted
Group2 = DirectMap4k + VmallocUsed + Unevictable + Mlocked + KernelStack
Group1 = Group5 + Group6
Group2 = Group5 + Group7
with:
Group5 = VmallocUsed + Mlocked
Group6 = PageTables + Percpu + Mapped + Buffers + Writeback + Hugepagesize + HardwareCorrupted
Group7 = DirectMap4k + Unevictable + KernelStack
Group6 = Group7
#### is it a coincidence that Group6 = Group7 ?
Check with [text](measurements/bug3897/alambix98/20240806-223916-meminfo.stdout)
PageTables: 66404 kB
Percpu: 229632 kB
Mapped: 143340 kB
Buffers: 843076 kB
Writeback: 0 kB
Hugepagesize: 2048 kB
HardwareCorrupted: 0 kB
---------------------------
Group6 1284500 kB
DirectMap4k: 551400 kB
Unevictable: 22480 kB
KernelStack: 17408 kB
---------------------------
Group7 591288 kB
-> ok: this means that Group6 = Group7 is a coincidence
-> I tend to prefer to beleive that Group6 is the right one, but this needs to be checked though
### sorted [text](measurements/bug3897/alambix97/20240805-191606-meminfo.stdout):
```s
VmallocTotal: 34359738367 kB
MemTotal: 196498248 kB
DirectMap1G: 195035136 kB
Committed_AS: 138311772 kB
CommitLimit: 130247072 kB
MemAvailable: 128385580 kB
Cached: 127870960 kB
Active: 100883568 kB
Inactive: 91970056 kB
Inactive(file): 65682016 kB
AnonPages: 63908328 kB
Active(file): 62142052 kB
AnonHugePages: 48064512 kB
Active(anon): 38741516 kB
Inactive(anon): 26288040 kB
SwapTotal: 31997948 kB
Dirty: 8346464 kB
DirectMap2M: 6283264 kB
Slab: 1944992 kB
KReclaimable: 1223464 kB
SReclaimable: 1223464 kB
SwapCached: 1063208 kB
MemFree: 784240 kB
SUnreclaim: 721528 kB
DirectMap4k: 541144 kB
VmallocUsed: 295248 kB
PageTables: 213772 kB
Percpu: 210048 kB
Mapped: 117740 kB
Buffers: 31232 kB
Unevictable: 22480 kB
Mlocked: 19408 kB
Writeback: 5420 kB
Shmem: 68316 kB
KernelStack: 16688 kB
Hugepagesize: 2048 kB
HardwareCorrupted: 52 kB
```
## filter out the sums that are not valid for other meminfo stdout
In order to remove the concidences in the sums found
```sh
starting sums (90 sums):
[{'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'Hard
invalid sums (85 sums):
[{'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active(file)', 'AnonHugePages', 'Active(anon)', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive(file)', 'Active(file)', 'Active(anon)', 'Inactive(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'SReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'KReclaimable', 'SwapCached', 'SUnreclaim', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Inactive', 'Active(file)', 'Active(anon)', 'Slab', 'SwapCached', 'DirectMap4k', 'Buffers', 'Unevictable', 'Mlocked', 'KernelStack', 'Writeback', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'SReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'VmallocUsed', 'PageTables', 'Percpu', 'Mapped', 'Buffers', 'Mlocked', 'Writeback', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Inactive(anon)', 'Dirty', 'DirectMap2M', 'Slab', 'KReclaimable', 'SwapCached', 'MemFree', 'SUnreclaim', 'DirectMap4k', 'VmallocUsed', 'Unevictable', 'Mlocked', 'KernelStack']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'SReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'HardwareCorrupted']}, {'total': 'MemTotal', 'components': ['Active', 'AnonHugePages', 'Active(anon)', 'DirectMap2M', 'KReclaimable', 'DirectMap4k', 'VmallocUsed', 'Percpu', 'Mapped', 'Shmem', 'Buffers', 'Mlocked', 'KernelStack', 'Hugepagesize', 'Hard
valid sums (5 sums):
[{'total': 'Active', 'components': ['Active(file)', 'Active(anon)']}, {'total': 'Inactive', 'components': ['Inactive(file)', 'Inactive(anon)']}, {'total': 'Slab', 'components': ['SReclaimable', 'SUnreclaim']}, {'total': 'Slab', 'components': ['KReclaimable', 'SUnreclaim']}, {'total': 'KReclaimable', 'components': ['SReclaimable']}]
last command status : [0]
```
-> this shows that most equations found by sumfinder on alambix97 set were not confirmed on alambix98 set