EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026>  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
<== Date ==> <== Thread ==>

Subject: Effects of setting glibc's MALLOC_ARENA_MAX=1
From: Abdalla Ahmad via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Tue, 18 Aug 2026 07:36:02 +0000
Hi

While migrating IOCs from CentOS 7 to Rocky Linux 8.10, I noticed that IOCs with Galil driver support have memory usage skyrocketed from 30MB to 350 MB with same dependencies versions on both servers. After research, I found out about that glibc, since 2.11, started to have per-thread memory arena instead of single "main arena" for all threads. To control maximum arenas, we have to set MALLOC_ARENA_MAX to the appropriate number.

I set MALLOC_ARENA_MAX to 1, and memory usage dropped back to around 35MB. My question is, has anyone run into this scenario? More specifically, does setting MALLOC_ARENA_MAX=1 have any side effects? To my understanding, setting it to 1 is almost the same as CentOS 7 and the nature of EPICS record and driver processing routines would not cause that much lock contention with concurrent allocation in the same arena, even with heavily threaded drivers like Galil. Any feedback is appreciated.

Best Regards,
Abdalla.

Replies:
Re: Effects of setting glibc's MALLOC_ARENA_MAX=1 Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Re: Oxford Cryostream 1000 IOC questions James P. Withrow via Tech-talk
Next: Process a PV on exit Dudley, David via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
Navigate by Thread:
Prev: Re: How to calculate checksum (three ASCII values) when using streamdevice LiangChih Chiang via Tech-talk
Next: Re: Effects of setting glibc's MALLOC_ARENA_MAX=1 Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  2025  <2026> 
ANJ, 18 Aug 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·