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

0.1.34 is showing abnormal debug memory usage information and 2% slower #89

Open
YamatoSecurity opened this issue Jan 10, 2023 · 1 comment

Comments

@YamatoSecurity
Copy link

Using 0.1.32 and earlier I would get results like this:

Memory usage stats:
heap stats:    peak      total      freed    current       unit      count
  reserved:    8.5 GiB    8.5 GiB  164.0 MiB    8.4 GiB                        not all freed!
 committed:    7.8 GiB   13.2 GiB    5.6 GiB    7.6 GiB                        not all freed!
     reset:      0          0          0          0                            ok
   touched:  128.5 KiB    3.0 MiB  320.0 GiB -320.0 GiB                        ok
  segments:     20         24         15          9                            not all freed!
-abandoned:      0          0          0          0                            ok
   -cached:      0          0          0          0                            ok
     pages:      0          0        3.0 Mi    -3.0 Mi                         ok
-abandoned:      0          0          0          0                            ok
 -extended:      0
 -noretire:      0
     mmaps:      0
   commits:    3.2 Ki
   threads:     16         16          0         16                            not all freed!
  searches:     0.0 avg
numa nodes:       1
   elapsed:    1957.036 s
   process: user: 13600.437 s, system: 49.359 s, faults: 2223526, rss: 7.6 GiB, commit: 7.8 GiB

But using the 0.1.34 version I get weird results:

Memory usage stats:
heap stats:    peak      total      freed    current       unit      count
  reserved:    8.3 GiB    8.4 GiB  276.0 MiB    8.2 GiB
 committed:    7.8 GiB  154.8 GiB  147.2 GiB    7.6 GiB
     reset:      0          0          0          0                            ok
   touched:   64.2 KiB   43.1 MiB  352.1 GiB -352.1 GiB                        ok
  segments:     39        691        681         10                            not all freed!
-abandoned:      0          0          0          0                            ok
   -cached:      0          0          0          0                            ok
     pages:      0          0        3.0 Mi    -3.0 Mi                         ok
-abandoned:      0          0          0          0                            ok
 -extended:      0
 -noretire:      0
     mmaps:      0
   commits:  125.6 Ki
   threads:     16         16          0         16                            not all freed!
  searches:     0.0 avg
numa nodes:       1
   elapsed:    1924.433 s
   process: user: 13721.656 s, system: 65.406 s, faults: 12445464, rss: 7.7 GiB, commit: 7.8 GiB

The total committed and freed go from 13GB to 154GB.

Also, we noticed that while it uses around 2% less memory, 0.1.34 is 2% slower than 0.1.32.

@fukusuket
Copy link

fukusuket commented Jan 10, 2023

Thank you for maintaining mimalloc_rust :)

Supplementary information for the above output.
We debug memory usage using the mi-malloc : mi_stats_print_out() function in the code below.

I would appreciate it if you could check it.

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

No branches or pull requests

2 participants