# How does \`--heap\_size\_hint\` relate to improvements for \`Sys.total\_memory()\`?

**URL:** <https://discourse.julialang.org/t/how-does-heap-size-hint-relate-to-improvements-for-sys-total-memory/100006>\
**Category:** Performance\
**Tags:** question, docker\
**Created:** [June 7, 2023, 2:46pm UTC](https://discourse.julialang.org/t/how-does-heap-size-hint-relate-to-improvements-for-sys-total-memory/100006 "2023-06-07T14:46:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [June 7, 2023, 2:46pm UTC](https://discourse.julialang.org/t/how-does-heap-size-hint-relate-to-improvements-for-sys-total-memory/100006/1 "2023-06-07T14:46:27Z")

</div>

Hi there,  
I am looking to make Julia run smoothly on a kubernetes pod. There seem to be two things which somehow improve stability:

- [Expose constrained memory limits and have the GC use them by maleadt · Pull Request #46796 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/46796) which makes `Sys.total_memory()` respect the docker memory
- [added new command line option heap\_size\_hint for greedy GC by rssdev10 · Pull Request #45369 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/45369) which introduces `--heap_size_hint` commandline option

My question: does it make sense to set the `heap_size_hint` in addition when running on docker?

* * *

Also note that there is draft pullrequest with even stricter handling of memory management on docker and the like, however don’t know whether it is still worked on [RFC: Avoid running out of memory by checking available memory before allocating by maleadt · Pull Request #46831 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/46831)
