-
Notifications
You must be signed in to change notification settings - Fork 106
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
metrics of snmalloc #409
Comments
Another thing is that it is probably not a good idea to print out the statistics after thread exiting in this situation. |
So those statistics are pretty heavy weight, and were not designed for production. More for working out what snmalloc is doing wrong. They have not really been maintained. There are very coarse statistics available from snmalloc/src/override/malloc-extensions.cc Lines 7 to 12 in 6e63874
This might be sufficient for what you are after. This is tracked all the time and is very cheap. It was considered the bare minimum for some other services. With the rewrite on the |
@SchrodingerZhu are you able to try #404 for your use case? This getting pretty stable now, and should address your concern about holding on to OS memory. What is the green line showing in the graph? RSS or Virtual memory usage? |
according to the name of the metric, it should be RSS. I can also see htop show similar memory usage of my program with the green line. |
Since all of my works now are in experimental mode, I would like to give snmalloc 2 and #404 a try. I could also report back the changes in performance and the metric. Thanks for the suggestions! And the above results were still on snmalloc 1 and there was something like a tens of seconds performance bump on some TPCH workload when switching from jemalloc to snmalloc, which really made me astonished. Let's see what we can get with snmalloc 2. |
I believe #404 is working since we can now see drops of RSS curve. as you can see after some peaks in the memory curve (it tried to acquire more than 169GiB!), the stats suddenly went to zero with The performance of |
I am going to look into a more consolidating calls to So did it work in terms of reducing the memory usage, or did it regress the memory usage and get OOM. I was clear from your message? |
|
@SchrodingerZhu would you be able to run this experiment again with the latest main branch? I have done a lot of work on bringing down the footprint, most examples are very close to snmalloc 1 now, so would be interested to know if I have fixed this. |
Hi,
I am implementing snmalloc support for an analytical database engine now. Everything works fine and the performance is really cool. But there is a problem on creating proper statistics of snmalloc:
Basically, I want something like resident memory and (de)committing information. Details like allocation size distribution can also be helpful but it is not an essence.
So I mimic the way of printing out the stats in snmalloc and wrote some code:
I don't know. but maybe the above method would create too many entries in the summary?
And any suggestion on creating more concise async metrics for the allocator?
The text was updated successfully, but these errors were encountered: