Skip to content
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

WIP [LibOS,PAL] Print stats of internal-memory allocators #1768

Closed
wants to merge 2 commits into from

Conversation

dimakuv
Copy link

@dimakuv dimakuv commented Feb 12, 2024

Description of the changes

On process/enclave termination, statistics of the MEMMGR and SLAB allocators are written to stderr.

This is a draft PR, not intended for merge. If we decide this is valuable, then this should be hidden under a new manifest option and beautified.

See #1767 for context.

How to test this PR?

Just run any workload. If workload runs infinitely (e.g. Redis server), don't forget to kill it gracefully via SIGTERM.


This change is Reviewable

On process/enclave termination, statistics of the MEMMGR and SLAB
allocators are written to stderr.

This is a draft commit, not intended for merge. If we decide this is
valuable, then this should be hidden under a new manifest option and
beautified.

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
Stats for Helloworld:

gramine-direct

~/gramineproject/gramine/CI-Examples/helloworld$ gramine-direct helloworld
Hello, world
[P1:T1:helloworld] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 17
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 1
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 16
[P1:T1:helloworld]  F                      stat_obj_frees = 1
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 6
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 6
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 8
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 2
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 6
[P1:T1:helloworld]  F                      stat_obj_frees = 5
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 58
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 58
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:helloworld] --------- level 0 (sizes less than 16)
[P1:T1:helloworld]  A                    stat_obj_allocas = 80
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 39
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 41
[P1:T1:helloworld]  F                      stat_obj_frees = 46
[P1:T1:helloworld]  AR                         stat_areas = 3
[P1:T1:helloworld] --------- level 1 (sizes less than 32)
[P1:T1:helloworld]  A                    stat_obj_allocas = 13
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 9
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 4
[P1:T1:helloworld]  F                      stat_obj_frees = 11
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 2 (sizes less than 64)
[P1:T1:helloworld]  A                    stat_obj_allocas = 7
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 3
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 4
[P1:T1:helloworld]  F                      stat_obj_frees = 5
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 3 (sizes less than 96)
[P1:T1:helloworld]  A                    stat_obj_allocas = 3
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 3
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 4 (sizes less than 224)
[P1:T1:helloworld]  A                    stat_obj_allocas = 114
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 11
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 103
[P1:T1:helloworld]  F                      stat_obj_frees = 12
[P1:T1:helloworld]  AR                         stat_areas = 4
[P1:T1:helloworld] --------- level 5 (sizes less than 480)
[P1:T1:helloworld]  A                    stat_obj_allocas = 1
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 1
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 6 (sizes less than 992)
[P1:T1:helloworld]  A                    stat_obj_allocas = 2
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 1
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 1
[P1:T1:helloworld]  F                      stat_obj_frees = 2
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 7 (sizes less than 2016)
[P1:T1:helloworld]  A                    stat_obj_allocas = 0
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 0
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- large objects
[P1:T1:helloworld]  A       stat_obj_allocas_large = 11
[P1:T1:helloworld]      stat_obj_allocas_large_min = 2080 B
[P1:T1:helloworld]      stat_obj_allocas_large_max = 13392 B
[P1:T1:helloworld]    stat_obj_allocas_large_total = 57536 B
[P1:T1:helloworld]  F         stat_obj_frees_large = 9
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 178
       stat_obj_allocas_from_free_list = 80
     stat_obj_allocas_from_active_area = 98
 F                      stat_obj_frees = 80
 AR                         stat_areas = 4
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 25
       stat_obj_allocas_from_free_list = 15
     stat_obj_allocas_from_active_area = 10
 F                      stat_obj_frees = 16
 AR                         stat_areas = 1
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 26
       stat_obj_allocas_from_free_list = 10
     stat_obj_allocas_from_active_area = 16
 F                      stat_obj_frees = 10
 AR                         stat_areas = 1
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 93
       stat_obj_allocas_from_free_list = 10
     stat_obj_allocas_from_active_area = 83
 F                      stat_obj_frees = 25
 AR                         stat_areas = 4
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 4
       stat_obj_allocas_from_free_list = 1
     stat_obj_allocas_from_active_area = 3
 F                      stat_obj_frees = 1
 AR                         stat_areas = 1
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 2
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 1
 AR                         stat_areas = 1
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 2
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 0
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 1
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 1
 F                      stat_obj_frees = 0
 AR                         stat_areas = 1
--------- large objects
 A       stat_obj_allocas_large = 3
     stat_obj_allocas_large_min = 2304 B
     stat_obj_allocas_large_max = 131072 B
   stat_obj_allocas_large_total = 198912 B
 F         stat_obj_frees_large = 0

gramine-sgx

~/gramineproject/gramine/CI-Examples/helloworld$ gramine-sgx helloworld
Hello, world
[P1:T1:helloworld] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 17
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 1
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 16
[P1:T1:helloworld]  F                      stat_obj_frees = 1
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 6
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 6
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 8
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 2
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 6
[P1:T1:helloworld]  F                      stat_obj_frees = 5
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:helloworld]  A                    stat_obj_allocas = 73
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 73
[P1:T1:helloworld]  F                      stat_obj_frees = 4
[P1:T1:helloworld]     stat_obj_frees_no_because_migrated = 0
[P1:T1:helloworld]  AR                         stat_areas = 2
[P1:T1:helloworld] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:helloworld] --------- level 0 (sizes less than 16)
[P1:T1:helloworld]  A                    stat_obj_allocas = 82
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 39
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 43
[P1:T1:helloworld]  F                      stat_obj_frees = 46
[P1:T1:helloworld]  AR                         stat_areas = 3
[P1:T1:helloworld] --------- level 1 (sizes less than 32)
[P1:T1:helloworld]  A                    stat_obj_allocas = 13
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 9
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 4
[P1:T1:helloworld]  F                      stat_obj_frees = 11
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 2 (sizes less than 64)
[P1:T1:helloworld]  A                    stat_obj_allocas = 9
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 3
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 6
[P1:T1:helloworld]  F                      stat_obj_frees = 5
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 3 (sizes less than 96)
[P1:T1:helloworld]  A                    stat_obj_allocas = 3
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 3
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 4 (sizes less than 224)
[P1:T1:helloworld]  A                    stat_obj_allocas = 121
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 11
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 110
[P1:T1:helloworld]  F                      stat_obj_frees = 12
[P1:T1:helloworld]  AR                         stat_areas = 4
[P1:T1:helloworld] --------- level 5 (sizes less than 480)
[P1:T1:helloworld]  A                    stat_obj_allocas = 1
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 1
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 6 (sizes less than 992)
[P1:T1:helloworld]  A                    stat_obj_allocas = 2
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 1
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 1
[P1:T1:helloworld]  F                      stat_obj_frees = 2
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- level 7 (sizes less than 2016)
[P1:T1:helloworld]  A                    stat_obj_allocas = 0
[P1:T1:helloworld]        stat_obj_allocas_from_free_list = 0
[P1:T1:helloworld]      stat_obj_allocas_from_active_area = 0
[P1:T1:helloworld]  F                      stat_obj_frees = 0
[P1:T1:helloworld]  AR                         stat_areas = 1
[P1:T1:helloworld] --------- large objects
[P1:T1:helloworld]  A       stat_obj_allocas_large = 11
[P1:T1:helloworld]      stat_obj_allocas_large_min = 2080 B
[P1:T1:helloworld]      stat_obj_allocas_large_max = 13392 B
[P1:T1:helloworld]    stat_obj_allocas_large_total = 57536 B
[P1:T1:helloworld]  F         stat_obj_frees_large = 9
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 699
       stat_obj_allocas_from_free_list = 289
     stat_obj_allocas_from_active_area = 410
 F                      stat_obj_frees = 293
 AR                         stat_areas = 6
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 48
       stat_obj_allocas_from_free_list = 32
     stat_obj_allocas_from_active_area = 16
 F                      stat_obj_frees = 34
 AR                         stat_areas = 1
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 182
       stat_obj_allocas_from_free_list = 115
     stat_obj_allocas_from_active_area = 67
 F                      stat_obj_frees = 117
 AR                         stat_areas = 4
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 396
       stat_obj_allocas_from_free_list = 233
     stat_obj_allocas_from_active_area = 163
 F                      stat_obj_frees = 252
 AR                         stat_areas = 5
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 210
       stat_obj_allocas_from_free_list = 121
     stat_obj_allocas_from_active_area = 89
 F                      stat_obj_frees = 123
 AR                         stat_areas = 4
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 44
       stat_obj_allocas_from_free_list = 9
     stat_obj_allocas_from_active_area = 35
 F                      stat_obj_frees = 20
 AR                         stat_areas = 3
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 25
       stat_obj_allocas_from_free_list = 20
     stat_obj_allocas_from_active_area = 5
 F                      stat_obj_frees = 22
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 27
       stat_obj_allocas_from_free_list = 20
     stat_obj_allocas_from_active_area = 7
 F                      stat_obj_frees = 22
 AR                         stat_areas = 1
--------- large objects
 A       stat_obj_allocas_large = 41
     stat_obj_allocas_large_min = 2304 B
     stat_obj_allocas_large_max = 16432 B
   stat_obj_allocas_large_total = 645552 B
 F         stat_obj_frees_large = 31

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
Stats for Blender:

gramine-direct

~/gramineproject/gramine/CI-Examples/blender$ make check
...
[P1:T1:blender] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:blender]  A                    stat_obj_allocas = 1181
[P1:T1:blender]        stat_obj_allocas_from_free_list = 175
[P1:T1:blender]      stat_obj_allocas_from_active_area = 1006
[P1:T1:blender]  F                      stat_obj_frees = 175
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 13
[P1:T1:blender] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:blender]  A                    stat_obj_allocas = 10
[P1:T1:blender]        stat_obj_allocas_from_free_list = 0
[P1:T1:blender]      stat_obj_allocas_from_active_area = 10
[P1:T1:blender]  F                      stat_obj_frees = 0
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:blender]  A                    stat_obj_allocas = 432
[P1:T1:blender]        stat_obj_allocas_from_free_list = 382
[P1:T1:blender]      stat_obj_allocas_from_active_area = 50
[P1:T1:blender]  F                      stat_obj_frees = 387
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 2
[P1:T1:blender] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:blender]  A                    stat_obj_allocas = 2944
[P1:T1:blender]        stat_obj_allocas_from_free_list = 84
[P1:T1:blender]      stat_obj_allocas_from_active_area = 2860
[P1:T1:blender]  F                      stat_obj_frees = 164
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 32
[P1:T1:blender] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:blender] --------- level 0 (sizes less than 16)
[P1:T1:blender]  A                    stat_obj_allocas = 1246
[P1:T1:blender]        stat_obj_allocas_from_free_list = 582
[P1:T1:blender]      stat_obj_allocas_from_active_area = 664
[P1:T1:blender]  F                      stat_obj_frees = 608
[P1:T1:blender]  AR                         stat_areas = 7
[P1:T1:blender] --------- level 1 (sizes less than 32)
[P1:T1:blender]  A                    stat_obj_allocas = 600
[P1:T1:blender]        stat_obj_allocas_from_free_list = 316
[P1:T1:blender]      stat_obj_allocas_from_active_area = 284
[P1:T1:blender]  F                      stat_obj_frees = 319
[P1:T1:blender]  AR                         stat_areas = 6
[P1:T1:blender] --------- level 2 (sizes less than 64)
[P1:T1:blender]  A                    stat_obj_allocas = 1831                                                                                                                        [53/1928]
[P1:T1:blender]        stat_obj_allocas_from_free_list = 1575
[P1:T1:blender]      stat_obj_allocas_from_active_area = 256
[P1:T1:blender]  F                      stat_obj_frees = 1678
[P1:T1:blender]  AR                         stat_areas = 5
[P1:T1:blender] --------- level 3 (sizes less than 96)
[P1:T1:blender]  A                    stat_obj_allocas = 503
[P1:T1:blender]        stat_obj_allocas_from_free_list = 465
[P1:T1:blender]      stat_obj_allocas_from_active_area = 38
[P1:T1:blender]  F                      stat_obj_frees = 487
[P1:T1:blender]  AR                         stat_areas = 3
[P1:T1:blender] --------- level 4 (sizes less than 224)
[P1:T1:blender]  A                    stat_obj_allocas = 2310
[P1:T1:blender]        stat_obj_allocas_from_free_list = 1221
[P1:T1:blender]      stat_obj_allocas_from_active_area = 1089
[P1:T1:blender]  F                      stat_obj_frees = 1222
[P1:T1:blender]  AR                         stat_areas = 8
[P1:T1:blender] --------- level 5 (sizes less than 480)
[P1:T1:blender]  A                    stat_obj_allocas = 20
[P1:T1:blender]        stat_obj_allocas_from_free_list = 17
[P1:T1:blender]      stat_obj_allocas_from_active_area = 3
[P1:T1:blender]  F                      stat_obj_frees = 17
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 6 (sizes less than 992)
[P1:T1:blender]  A                    stat_obj_allocas = 27
[P1:T1:blender]        stat_obj_allocas_from_free_list = 24
[P1:T1:blender]      stat_obj_allocas_from_active_area = 3
[P1:T1:blender]  F                      stat_obj_frees = 27
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 7 (sizes less than 2016)
[P1:T1:blender]  A                    stat_obj_allocas = 12
[P1:T1:blender]        stat_obj_allocas_from_free_list = 10
[P1:T1:blender]      stat_obj_allocas_from_active_area = 2
[P1:T1:blender]  F                      stat_obj_frees = 12
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- large objects
[P1:T1:blender]  A       stat_obj_allocas_large = 5146
[P1:T1:blender]      stat_obj_allocas_large_min = 2048 B
[P1:T1:blender]      stat_obj_allocas_large_max = 21008 B
[P1:T1:blender]    stat_obj_allocas_large_total = 18924480 B
[P1:T1:blender]  F         stat_obj_frees_large = 5137
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 269
       stat_obj_allocas_from_free_list = 120
     stat_obj_allocas_from_active_area = 149
 F                      stat_obj_frees = 121
 AR                         stat_areas = 5
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 40
       stat_obj_allocas_from_free_list = 23
     stat_obj_allocas_from_active_area = 17
 F                      stat_obj_frees = 25
 AR                         stat_areas = 2
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 108
       stat_obj_allocas_from_free_list = 49
     stat_obj_allocas_from_active_area = 59
 F                      stat_obj_frees = 51
 AR                         stat_areas = 3
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 2545
       stat_obj_allocas_from_free_list = 1195
     stat_obj_allocas_from_active_area = 1350
 F                      stat_obj_frees = 1323
 AR                         stat_areas = 8
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 174
       stat_obj_allocas_from_free_list = 167
     stat_obj_allocas_from_active_area = 7
 F                      stat_obj_frees = 168
 AR                         stat_areas = 1
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 4
       stat_obj_allocas_from_free_list = 1
     stat_obj_allocas_from_active_area = 3
 F                      stat_obj_frees = 3
 AR                         stat_areas = 1
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 2
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 0
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 19
       stat_obj_allocas_from_free_list = 17
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 18
 AR                         stat_areas = 1
--------- large objects
 A       stat_obj_allocas_large = 34
     stat_obj_allocas_large_min = 2208 B
     stat_obj_allocas_large_max = 131072 B
   stat_obj_allocas_large_total = 4133280 B
 F         stat_obj_frees_large = 0

gramine-sgx

~/gramineproject/gramine/CI-Examples/blender$ SGX=1 make check
...
[P1:T1:blender] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:blender]  A                    stat_obj_allocas = 1182
[P1:T1:blender]        stat_obj_allocas_from_free_list = 176
[P1:T1:blender]      stat_obj_allocas_from_active_area = 1006
[P1:T1:blender]  F                      stat_obj_frees = 176
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 13
[P1:T1:blender] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:blender]  A                    stat_obj_allocas = 10
[P1:T1:blender]        stat_obj_allocas_from_free_list = 0
[P1:T1:blender]      stat_obj_allocas_from_active_area = 10
[P1:T1:blender]  F                      stat_obj_frees = 0
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:blender]  A                    stat_obj_allocas = 429
[P1:T1:blender]        stat_obj_allocas_from_free_list = 379
[P1:T1:blender]      stat_obj_allocas_from_active_area = 50
[P1:T1:blender]  F                      stat_obj_frees = 384
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 2
[P1:T1:blender] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:blender]  A                    stat_obj_allocas = 3123
[P1:T1:blender]        stat_obj_allocas_from_free_list = 104
[P1:T1:blender]      stat_obj_allocas_from_active_area = 3019
[P1:T1:blender]  F                      stat_obj_frees = 274
[P1:T1:blender]     stat_obj_frees_no_because_migrated = 0
[P1:T1:blender]  AR                         stat_areas = 34
[P1:T1:blender] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:blender] --------- level 0 (sizes less than 16)
[P1:T1:blender]  A                    stat_obj_allocas = 1184
[P1:T1:blender]        stat_obj_allocas_from_free_list = 517
[P1:T1:blender]      stat_obj_allocas_from_active_area = 667
[P1:T1:blender]  F                      stat_obj_frees = 544
[P1:T1:blender]  AR                         stat_areas = 7
[P1:T1:blender] --------- level 1 (sizes less than 32)
[P1:T1:blender]  A                    stat_obj_allocas = 617
[P1:T1:blender]        stat_obj_allocas_from_free_list = 333
[P1:T1:blender]      stat_obj_allocas_from_active_area = 284
[P1:T1:blender]  F                      stat_obj_frees = 336
[P1:T1:blender]  AR                         stat_areas = 6
[P1:T1:blender] --------- level 2 (sizes less than 64)
[P1:T1:blender]  A                    stat_obj_allocas = 1856
[P1:T1:blender]        stat_obj_allocas_from_free_list = 1596
[P1:T1:blender]      stat_obj_allocas_from_active_area = 260
[P1:T1:blender]  F                      stat_obj_frees = 1701
[P1:T1:blender]  AR                         stat_areas = 6
[P1:T1:blender] --------- level 3 (sizes less than 96)
[P1:T1:blender]  A                    stat_obj_allocas = 503
[P1:T1:blender]        stat_obj_allocas_from_free_list = 465
[P1:T1:blender]      stat_obj_allocas_from_active_area = 38
[P1:T1:blender]  F                      stat_obj_frees = 486
[P1:T1:blender]  AR                         stat_areas = 3
[P1:T1:blender] --------- level 4 (sizes less than 224)
[P1:T1:blender]  A                    stat_obj_allocas = 2317
[P1:T1:blender]        stat_obj_allocas_from_free_list = 1221
[P1:T1:blender]      stat_obj_allocas_from_active_area = 1096
[P1:T1:blender]  F                      stat_obj_frees = 1222
[P1:T1:blender]  AR                         stat_areas = 8
[P1:T1:blender] --------- level 5 (sizes less than 480)
[P1:T1:blender]  A                    stat_obj_allocas = 20
[P1:T1:blender]        stat_obj_allocas_from_free_list = 17
[P1:T1:blender]      stat_obj_allocas_from_active_area = 3
[P1:T1:blender]  F                      stat_obj_frees = 17
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 6 (sizes less than 992)
[P1:T1:blender]  A                    stat_obj_allocas = 27
[P1:T1:blender]        stat_obj_allocas_from_free_list = 24
[P1:T1:blender]      stat_obj_allocas_from_active_area = 3
[P1:T1:blender]  F                      stat_obj_frees = 27
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 7 (sizes less than 2016)
[P1:T1:blender]  A                    stat_obj_allocas = 12
[P1:T1:blender]        stat_obj_allocas_from_free_list = 10
[P1:T1:blender]      stat_obj_allocas_from_active_area = 2
[P1:T1:blender]  F                      stat_obj_frees = 12
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- large objects
[P1:T1:blender]  A       stat_obj_allocas_large = 5234
[P1:T1:blender]      stat_obj_allocas_large_min = 2048 B
[P1:T1:blender]      stat_obj_allocas_large_max = 21008 B
[P1:T1:blender]    stat_obj_allocas_large_total = 19239872 B
[P1:T1:blender]  F         stat_obj_frees_large = 5224
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 98173
       stat_obj_allocas_from_free_list = 39286
     stat_obj_allocas_from_active_area = 58887
 F                      stat_obj_frees = 39357
 AR                         stat_areas = 13
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 167
       stat_obj_allocas_from_free_list = 79
     stat_obj_allocas_from_active_area = 88
 F                      stat_obj_frees = 126
 AR                         stat_areas = 4
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 41543
       stat_obj_allocas_from_free_list = 26057
     stat_obj_allocas_from_active_area = 15486
 F                      stat_obj_frees = 26059
 AR                         stat_areas = 11
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 40779
       stat_obj_allocas_from_free_list = 25445
     stat_obj_allocas_from_active_area = 15334
 F                      stat_obj_frees = 25666
 AR                         stat_areas = 11
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 11319
       stat_obj_allocas_from_free_list = 1468
     stat_obj_allocas_from_active_area = 9851
 F                      stat_obj_frees = 1470
 AR                         stat_areas = 11
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 401
       stat_obj_allocas_from_free_list = 31
     stat_obj_allocas_from_active_area = 370
 F                      stat_obj_frees = 289
 AR                         stat_areas = 6
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 95
       stat_obj_allocas_from_free_list = 84
     stat_obj_allocas_from_active_area = 11
 F                      stat_obj_frees = 86
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 123
       stat_obj_allocas_from_free_list = 54
     stat_obj_allocas_from_active_area = 69
 F                      stat_obj_frees = 101
 AR                         stat_areas = 4
--------- large objects
 A       stat_obj_allocas_large = 10121
     stat_obj_allocas_large_min = 2048 B
     stat_obj_allocas_large_max = 312864 B
   stat_obj_allocas_large_total = 1536388272 B
 F         stat_obj_frees_large = 10079

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 3 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
Stats for Redis server:

(Client is memtier_benchmark --port=6379 --protocol=redis --hide-histogram)

gramine-direct

~/gramineproject/gramine/CI-Examples/redis$ gramine-direct redis-server
...
[P1:T1:redis-server] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 35
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 6
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 29
[P1:T1:redis-server]  F                      stat_obj_frees = 6
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 6
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 0
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 6
[P1:T1:redis-server]  F                      stat_obj_frees = 0
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 547
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 333
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 214
[P1:T1:redis-server]  F                      stat_obj_frees = 541
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 6
[P1:T1:redis-server] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 772
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 133
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 639
[P1:T1:redis-server]  F                      stat_obj_frees = 377
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 8
[P1:T1:redis-server] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:redis-server] --------- level 0 (sizes less than 16)
[P1:T1:redis-server]  A                    stat_obj_allocas = 41068
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 40806
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 262
[P1:T1:redis-server]  F                      stat_obj_frees = 40816
[P1:T1:redis-server]  AR                         stat_areas = 6
[P1:T1:redis-server] --------- level 1 (sizes less than 32)
[P1:T1:redis-server]  A                    stat_obj_allocas = 650
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 643
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 7
[P1:T1:redis-server]  F                      stat_obj_frees = 646
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 2 (sizes less than 64)
[P1:T1:redis-server]  A                    stat_obj_allocas = 37
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 31
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 6
[P1:T1:redis-server]  F                      stat_obj_frees = 35
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 3 (sizes less than 96)
[P1:T1:redis-server]  A                    stat_obj_allocas = 212
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 4
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 208
[P1:T1:redis-server]  F                      stat_obj_frees = 207
[P1:T1:redis-server]  AR                         stat_areas = 5
[P1:T1:redis-server] --------- level 4 (sizes less than 224)
[P1:T1:redis-server]  A                    stat_obj_allocas = 134
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 18
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 116
[P1:T1:redis-server]  F                      stat_obj_frees = 18
[P1:T1:redis-server]  AR                         stat_areas = 4
[P1:T1:redis-server] --------- level 5 (sizes less than 480)
[P1:T1:redis-server]  A                    stat_obj_allocas = 330
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 326
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 4
[P1:T1:redis-server]  F                      stat_obj_frees = 326
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 6 (sizes less than 992)
[P1:T1:redis-server]  A                    stat_obj_allocas = 6
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 3
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 6
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 7 (sizes less than 2016)
[P1:T1:redis-server]  A                    stat_obj_allocas = 60481
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 60478
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 60481
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- large objects
[P1:T1:redis-server]  A       stat_obj_allocas_large = 1447
[P1:T1:redis-server]      stat_obj_allocas_large_min = 2048 B
[P1:T1:redis-server]      stat_obj_allocas_large_max = 13392 B
[P1:T1:redis-server]    stat_obj_allocas_large_total = 5263440 B
[P1:T1:redis-server]  F         stat_obj_frees_large = 1440
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 187
       stat_obj_allocas_from_free_list = 81
     stat_obj_allocas_from_active_area = 106
 F                      stat_obj_frees = 81
 AR                         stat_areas = 4
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 29
       stat_obj_allocas_from_free_list = 18
     stat_obj_allocas_from_active_area = 11
 F                      stat_obj_frees = 18
 AR                         stat_areas = 1
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 32
       stat_obj_allocas_from_free_list = 11
     stat_obj_allocas_from_active_area = 21
 F                      stat_obj_frees = 11
 AR                         stat_areas = 2
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 1847
       stat_obj_allocas_from_free_list = 703
     stat_obj_allocas_from_active_area = 1144
 F                      stat_obj_frees = 1739
 AR                         stat_areas = 8
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 4
       stat_obj_allocas_from_free_list = 1
     stat_obj_allocas_from_active_area = 3
 F                      stat_obj_frees = 1
 AR                         stat_areas = 1
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 4
       stat_obj_allocas_from_free_list = 2
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 3
 AR                         stat_areas = 1
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 2
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 1
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 20162
       stat_obj_allocas_from_free_list = 20159
     stat_obj_allocas_from_active_area = 3
 F                      stat_obj_frees = 20160
 AR                         stat_areas = 1
--------- large objects
 A       stat_obj_allocas_large = 8
     stat_obj_allocas_large_min = 2304 B
     stat_obj_allocas_large_max = 131072 B
   stat_obj_allocas_large_total = 854272 B
 F         stat_obj_frees_large = 0

gramine-sgx

~/gramineproject/gramine/CI-Examples/redis$ gramine-sgx redis-server
...
[P1:T1:redis-server] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 35
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 6
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 29
[P1:T1:redis-server]  F                      stat_obj_frees = 6
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 6
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 0
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 6
[P1:T1:redis-server]  F                      stat_obj_frees = 0
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 1153
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 939
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 214
[P1:T1:redis-server]  F                      stat_obj_frees = 1147
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 6
[P1:T1:redis-server] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:redis-server]  A                    stat_obj_allocas = 685
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 29
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 656
[P1:T1:redis-server]  F                      stat_obj_frees = 404
[P1:T1:redis-server]     stat_obj_frees_no_because_migrated = 0
[P1:T1:redis-server]  AR                         stat_areas = 8
[P1:T1:redis-server] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:redis-server] --------- level 0 (sizes less than 16)
[P1:T1:redis-server]  A                    stat_obj_allocas = 24214
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 23950
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 264
[P1:T1:redis-server]  F                      stat_obj_frees = 23960
[P1:T1:redis-server]  AR                         stat_areas = 6
[P1:T1:redis-server] --------- level 1 (sizes less than 32)
[P1:T1:redis-server]  A                    stat_obj_allocas = 1250
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 1243
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 7
[P1:T1:redis-server]  F                      stat_obj_frees = 1246
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 2 (sizes less than 64)
[P1:T1:redis-server]  A                    stat_obj_allocas = 31
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 23
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 8
[P1:T1:redis-server]  F                      stat_obj_frees = 27
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 3 (sizes less than 96)
[P1:T1:redis-server]  A                    stat_obj_allocas = 212
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 4
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 208
[P1:T1:redis-server]  F                      stat_obj_frees = 207
[P1:T1:redis-server]  AR                         stat_areas = 5
[P1:T1:redis-server] --------- level 4 (sizes less than 224)
[P1:T1:redis-server]  A                    stat_obj_allocas = 141
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 18
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 123
[P1:T1:redis-server]  F                      stat_obj_frees = 18
[P1:T1:redis-server]  AR                         stat_areas = 4
[P1:T1:redis-server] --------- level 5 (sizes less than 480)
[P1:T1:redis-server]  A                    stat_obj_allocas = 931
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 928
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 931
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 6 (sizes less than 992)
[P1:T1:redis-server]  A                    stat_obj_allocas = 3
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 2
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 1
[P1:T1:redis-server]  F                      stat_obj_frees = 3
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 7 (sizes less than 2016)
[P1:T1:redis-server]  A                    stat_obj_allocas = 34603
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 34600
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 34603
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- large objects
[P1:T1:redis-server]  A       stat_obj_allocas_large = 1126
[P1:T1:redis-server]      stat_obj_allocas_large_min = 2048 B
[P1:T1:redis-server]      stat_obj_allocas_large_max = 13392 B
[P1:T1:redis-server]    stat_obj_allocas_large_total = 4112032 B
[P1:T1:redis-server]  F         stat_obj_frees_large = 1119
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 741
       stat_obj_allocas_from_free_list = 308
     stat_obj_allocas_from_active_area = 433
 F                      stat_obj_frees = 314
 AR                         stat_areas = 6
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 75
       stat_obj_allocas_from_free_list = 46
     stat_obj_allocas_from_active_area = 29
 F                      stat_obj_frees = 50
 AR                         stat_areas = 2
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 188
       stat_obj_allocas_from_free_list = 116
     stat_obj_allocas_from_active_area = 72
 F                      stat_obj_frees = 118
 AR                         stat_areas = 4
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 3610
       stat_obj_allocas_from_free_list = 2366
     stat_obj_allocas_from_active_area = 1244
 F                      stat_obj_frees = 3408
 AR                         stat_areas = 8
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 294
       stat_obj_allocas_from_free_list = 205
     stat_obj_allocas_from_active_area = 89
 F                      stat_obj_frees = 207
 AR                         stat_areas = 4
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 122
       stat_obj_allocas_from_free_list = 31
     stat_obj_allocas_from_active_area = 91
 F                      stat_obj_frees = 54
 AR                         stat_areas = 4
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 40
       stat_obj_allocas_from_free_list = 34
     stat_obj_allocas_from_active_area = 6
 F                      stat_obj_frees = 36
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 11575
       stat_obj_allocas_from_free_list = 11557
     stat_obj_allocas_from_active_area = 18
 F                      stat_obj_frees = 11562
 AR                         stat_areas = 2
--------- large objects
 A       stat_obj_allocas_large = 88
     stat_obj_allocas_large_min = 2304 B
     stat_obj_allocas_large_max = 16432 B
   stat_obj_allocas_large_total = 1412112 B
 F         stat_obj_frees_large = 61

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 4 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
Stats for Memcached:

(Client is memtier_benchmark --port=11211 --protocol=memcache_binary --hide-histogram)

gramine-direct

~/gramineproject/gramine/CI-Examples/memcached$ gramine-direct memcached
[P1:T1:memcached] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 46
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 3
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 43
[P1:T1:memcached]  F                      stat_obj_frees = 3
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 7
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 7
[P1:T1:memcached]  F                      stat_obj_frees = 0
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 247
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 19
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 228
[P1:T1:memcached]  F                      stat_obj_frees = 242
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 7
[P1:T1:memcached] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 163
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 3
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 160
[P1:T1:memcached]  F                      stat_obj_frees = 17
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 3
[P1:T1:memcached] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:memcached] --------- level 0 (sizes less than 16)
[P1:T1:memcached]  A                    stat_obj_allocas = 437434
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 437127
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 307
[P1:T1:memcached]  F                      stat_obj_frees = 437156
[P1:T1:memcached]  AR                         stat_areas = 6
[P1:T1:memcached] --------- level 1 (sizes less than 32)
[P1:T1:memcached]  A                    stat_obj_allocas = 497
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 476
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 21
[P1:T1:memcached]  F                      stat_obj_frees = 489
[P1:T1:memcached]  AR                         stat_areas = 2
[P1:T1:memcached] --------- level 2 (sizes less than 64)
[P1:T1:memcached]  A                    stat_obj_allocas = 1083
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 1064
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 19
[P1:T1:memcached]  F                      stat_obj_frees = 1080
[P1:T1:memcached]  AR                         stat_areas = 2
[P1:T1:memcached] --------- level 3 (sizes less than 96)
[P1:T1:memcached]  A                    stat_obj_allocas = 310
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 91
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 219
[P1:T1:memcached]  F                      stat_obj_frees = 307
[P1:T1:memcached]  AR                         stat_areas = 5
[P1:T1:memcached] --------- level 4 (sizes less than 224)
[P1:T1:memcached]  A                    stat_obj_allocas = 432
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 299
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 133
[P1:T1:memcached]  F                      stat_obj_frees = 311
[P1:T1:memcached]  AR                         stat_areas = 5
[P1:T1:memcached] --------- level 5 (sizes less than 480)
[P1:T1:memcached]  A                    stat_obj_allocas = 654083
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 654071
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 12
[P1:T1:memcached]  F                      stat_obj_frees = 654079
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 6 (sizes less than 992)
[P1:T1:memcached]  A                    stat_obj_allocas = 3
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 2
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 1
[P1:T1:memcached]  F                      stat_obj_frees = 3
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 7 (sizes less than 2016)
[P1:T1:memcached]  A                    stat_obj_allocas = 1
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 1
[P1:T1:memcached]  F                      stat_obj_frees = 1
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- large objects
[P1:T1:memcached]  A       stat_obj_allocas_large = 47
[P1:T1:memcached]      stat_obj_allocas_large_min = 2048 B
[P1:T1:memcached]      stat_obj_allocas_large_max = 13392 B
[P1:T1:memcached]    stat_obj_allocas_large_total = 292912 B
[P1:T1:memcached]  F         stat_obj_frees_large = 42
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 208
       stat_obj_allocas_from_free_list = 90
     stat_obj_allocas_from_active_area = 118
 F                      stat_obj_frees = 90
 AR                         stat_areas = 4
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 29
       stat_obj_allocas_from_free_list = 16
     stat_obj_allocas_from_active_area = 13
 F                      stat_obj_frees = 18
 AR                         stat_areas = 1
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 36
       stat_obj_allocas_from_free_list = 11
     stat_obj_allocas_from_active_area = 25
 F                      stat_obj_frees = 12
 AR                         stat_areas = 2
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 1311
       stat_obj_allocas_from_free_list = 95
     stat_obj_allocas_from_active_area = 1216
 F                      stat_obj_frees = 1210
 AR                         stat_areas = 8
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 88
       stat_obj_allocas_from_free_list = 81
     stat_obj_allocas_from_active_area = 7
 F                      stat_obj_frees = 85
 AR                         stat_areas = 1
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 218019
       stat_obj_allocas_from_free_list = 218013
     stat_obj_allocas_from_active_area = 6
 F                      stat_obj_frees = 218017
 AR                         stat_areas = 1
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 1
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 1
 F                      stat_obj_frees = 0
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 2
       stat_obj_allocas_from_free_list = 0
     stat_obj_allocas_from_active_area = 2
 F                      stat_obj_frees = 0
 AR                         stat_areas = 1
--------- large objects
 A       stat_obj_allocas_large = 13
     stat_obj_allocas_large_min = 2304 B
     stat_obj_allocas_large_max = 131072 B
   stat_obj_allocas_large_total = 1509632 B
 F         stat_obj_frees_large = 0

gramine-sgx

~/gramineproject/gramine/CI-Examples/memcached$ gramine-sgx memcached
[P1:T1:memcached] ---- STATS FOR MEMMGR `FS dentries` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 46
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 3
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 43
[P1:T1:memcached]  F                      stat_obj_frees = 3
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] ---- STATS FOR MEMMGR `FS mounts` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 7
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 7
[P1:T1:memcached]  F                      stat_obj_frees = 0
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] ---- STATS FOR MEMMGR `libos handles` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 247
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 19
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 228
[P1:T1:memcached]  F                      stat_obj_frees = 242
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 7
[P1:T1:memcached] ---- STATS FOR MEMMGR `VMAs` -----
[P1:T1:memcached]  A                    stat_obj_allocas = 258
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 7
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 251
[P1:T1:memcached]  F                      stat_obj_frees = 48
[P1:T1:memcached]     stat_obj_frees_no_because_migrated = 0
[P1:T1:memcached]  AR                         stat_areas = 4
[P1:T1:memcached] ---- STATS FOR SLAB MGR IN LIBOS -----
[P1:T1:memcached] --------- level 0 (sizes less than 16)
[P1:T1:memcached]  A                    stat_obj_allocas = 126314
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 126005
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 309
[P1:T1:memcached]  F                      stat_obj_frees = 126030
[P1:T1:memcached]  AR                         stat_areas = 6
[P1:T1:memcached] --------- level 1 (sizes less than 32)
[P1:T1:memcached]  A                    stat_obj_allocas = 501
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 479
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 22
[P1:T1:memcached]  F                      stat_obj_frees = 493
[P1:T1:memcached]  AR                         stat_areas = 2
[P1:T1:memcached] --------- level 2 (sizes less than 64)
[P1:T1:memcached]  A                    stat_obj_allocas = 1329
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 1308
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 21
[P1:T1:memcached]  F                      stat_obj_frees = 1324
[P1:T1:memcached]  AR                         stat_areas = 2
[P1:T1:memcached] --------- level 3 (sizes less than 96)
[P1:T1:memcached]  A                    stat_obj_allocas = 276
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 57
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 219
[P1:T1:memcached]  F                      stat_obj_frees = 268
[P1:T1:memcached]  AR                         stat_areas = 6
[P1:T1:memcached] --------- level 4 (sizes less than 224)
[P1:T1:memcached]  A                    stat_obj_allocas = 359
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 219
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 140
[P1:T1:memcached]  F                      stat_obj_frees = 231
[P1:T1:memcached]  AR                         stat_areas = 5
[P1:T1:memcached] --------- level 5 (sizes less than 480)
[P1:T1:memcached]  A                    stat_obj_allocas = 187514
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 187502
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 12
[P1:T1:memcached]  F                      stat_obj_frees = 187512
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 6 (sizes less than 992)
[P1:T1:memcached]  A                    stat_obj_allocas = 3
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 2
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 1
[P1:T1:memcached]  F                      stat_obj_frees = 3
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 7 (sizes less than 2016)
[P1:T1:memcached]  A                    stat_obj_allocas = 1
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 1
[P1:T1:memcached]  F                      stat_obj_frees = 1
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- large objects
[P1:T1:memcached]  A       stat_obj_allocas_large = 54
[P1:T1:memcached]      stat_obj_allocas_large_min = 2048 B
[P1:T1:memcached]      stat_obj_allocas_large_max = 13392 B
[P1:T1:memcached]    stat_obj_allocas_large_total = 308192 B
[P1:T1:memcached]  F         stat_obj_frees_large = 45
---- STATS FOR SLAB MGR IN PAL -----
--------- level 0 (sizes less than 16)
 A                    stat_obj_allocas = 95732
       stat_obj_allocas_from_free_list = 38300
     stat_obj_allocas_from_active_area = 57432
 F                      stat_obj_frees = 38331
 AR                         stat_areas = 13
--------- level 1 (sizes less than 32)
 A                    stat_obj_allocas = 98
       stat_obj_allocas_from_free_list = 52
     stat_obj_allocas_from_active_area = 46
 F                      stat_obj_frees = 72
 AR                         stat_areas = 3
--------- level 2 (sizes less than 64)
 A                    stat_obj_allocas = 40297
       stat_obj_allocas_from_free_list = 25300
     stat_obj_allocas_from_active_area = 14997
 F                      stat_obj_frees = 25301
 AR                         stat_areas = 11
--------- level 3 (sizes less than 112)
 A                    stat_obj_allocas = 37888
       stat_obj_allocas_from_free_list = 23002
     stat_obj_allocas_from_active_area = 14886
 F                      stat_obj_frees = 24141
 AR                         stat_areas = 11
--------- level 4 (sizes less than 240)
 A                    stat_obj_allocas = 10262
       stat_obj_allocas_from_free_list = 653
     stat_obj_allocas_from_active_area = 9609
 F                      stat_obj_frees = 657
 AR                         stat_areas = 11
--------- level 5 (sizes less than 496)
 A                    stat_obj_allocas = 62740
       stat_obj_allocas_from_free_list = 62546
     stat_obj_allocas_from_active_area = 194
 F                      stat_obj_frees = 62660
 AR                         stat_areas = 6
--------- level 6 (sizes less than 1008)
 A                    stat_obj_allocas = 55
       stat_obj_allocas_from_free_list = 50
     stat_obj_allocas_from_active_area = 5
 F                      stat_obj_frees = 52
 AR                         stat_areas = 1
--------- level 7 (sizes less than 2032)
 A                    stat_obj_allocas = 69
       stat_obj_allocas_from_free_list = 34
     stat_obj_allocas_from_active_area = 35
 F                      stat_obj_frees = 54
 AR                         stat_areas = 3
--------- large objects
 A       stat_obj_allocas_large = 9596
     stat_obj_allocas_large_min = 2048 B
     stat_obj_allocas_large_max = 305472 B
   stat_obj_allocas_large_total = 1459934176 B
 F         stat_obj_frees_large = 9565

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 5 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
Looking at SLAB allocation stats of Blender, Redis, and Memcached, we notice that there are many objects that fall into 3KB - 7KB range. So adding two more SLAB levels (for ~4KB and for ~8KB) seems reasonable.


This is for quick testing whether we need these levels.

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 15 files reviewed, 6 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "WIP" found in commit messages' one-liners

a discussion (no related file):
I added two new SLAB levels (for ~4KB and ~8KB, see second commit in this PR).

In comparison to previously posted numbers, here are the results for Blender, Redis and Memcached. Showing only the interesting parts for comparison:

Blender

  • gramine-sgx
[P1:T1:blender] ---- STATS FOR SLAB MGR IN LIBOS -----
...
[P1:T1:blender] --------- level 7 (sizes less than 2016)
[P1:T1:blender]  A                    stat_obj_allocas = 12
[P1:T1:blender]        stat_obj_allocas_from_free_list = 10
[P1:T1:blender]      stat_obj_allocas_from_active_area = 2
[P1:T1:blender]  F                      stat_obj_frees = 12
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 8 (sizes less than 4064)
[P1:T1:blender]  A                    stat_obj_allocas = 5002
[P1:T1:blender]        stat_obj_allocas_from_free_list = 4997
[P1:T1:blender]      stat_obj_allocas_from_active_area = 5
[P1:T1:blender]  F                      stat_obj_frees = 5001
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- level 9 (sizes less than 8256)
[P1:T1:blender]  A                    stat_obj_allocas = 53
[P1:T1:blender]        stat_obj_allocas_from_free_list = 51
[P1:T1:blender]      stat_obj_allocas_from_active_area = 2
[P1:T1:blender]  F                      stat_obj_frees = 53
[P1:T1:blender]  AR                         stat_areas = 1
[P1:T1:blender] --------- large objects
[P1:T1:blender]  A       stat_obj_allocas_large = 43
[P1:T1:blender]      stat_obj_allocas_large_min = 8320 B
[P1:T1:blender]      stat_obj_allocas_large_max = 21008 B
[P1:T1:blender]    stat_obj_allocas_large_total = 547792 B
[P1:T1:blender]  F         stat_obj_frees_large = 34
...

Redis

  • gramine-sgx
[P1:T1:redis-server] ---- STATS FOR SLAB MGR IN LIBOS -----
...
[P1:T1:redis-server] --------- level 7 (sizes less than 2016)
[P1:T1:redis-server]  A                    stat_obj_allocas = 34282
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 34279
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 34282
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 8 (sizes less than 4064)
[P1:T1:redis-server]  A                    stat_obj_allocas = 1060
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 1057
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 3
[P1:T1:redis-server]  F                      stat_obj_frees = 1058
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- level 9 (sizes less than 8256)
[P1:T1:redis-server]  A                    stat_obj_allocas = 2
[P1:T1:redis-server]        stat_obj_allocas_from_free_list = 1
[P1:T1:redis-server]      stat_obj_allocas_from_active_area = 1
[P1:T1:redis-server]  F                      stat_obj_frees = 2
[P1:T1:redis-server]  AR                         stat_areas = 1
[P1:T1:redis-server] --------- large objects
[P1:T1:redis-server]  A       stat_obj_allocas_large = 7
[P1:T1:redis-server]      stat_obj_allocas_large_min = 13392 B
[P1:T1:redis-server]      stat_obj_allocas_large_max = 13392 B
[P1:T1:redis-server]    stat_obj_allocas_large_total = 93744 B
[P1:T1:redis-server]  F         stat_obj_frees_large = 5
...

Memcached

  • gramine-sgx
[P1:T1:memcached] ---- STATS FOR SLAB MGR IN LIBOS -----
...
[P1:T1:memcached] --------- level 7 (sizes less than 2016)
[P1:T1:memcached]  A                    stat_obj_allocas = 1
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 1
[P1:T1:memcached]  F                      stat_obj_frees = 1
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 8 (sizes less than 4064)
[P1:T1:memcached]  A                    stat_obj_allocas = 40
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 38
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 2
[P1:T1:memcached]  F                      stat_obj_frees = 38
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- level 9 (sizes less than 8256)
[P1:T1:memcached]  A                    stat_obj_allocas = 0
[P1:T1:memcached]        stat_obj_allocas_from_free_list = 0
[P1:T1:memcached]      stat_obj_allocas_from_active_area = 0
[P1:T1:memcached]  F                      stat_obj_frees = 0
[P1:T1:memcached]  AR                         stat_areas = 1
[P1:T1:memcached] --------- large objects
[P1:T1:memcached]  A       stat_obj_allocas_large = 12
[P1:T1:memcached]      stat_obj_allocas_large_min = 13392 B
[P1:T1:memcached]      stat_obj_allocas_large_max = 13392 B
[P1:T1:memcached]    stat_obj_allocas_large_total = 160704 B
[P1:T1:memcached]  F         stat_obj_frees_large = 6
...

Quick conclusion: there are many objects that are `[2KB, 4KB) in size.


@dimakuv
Copy link
Author

dimakuv commented Apr 2, 2024

Closing this PR as it fulfilled its mission. But not deleting the branch yet, as we may need this in the future.

@dimakuv dimakuv closed this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant