Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I see there is mallocoptions=disclaim that can be set on AIX for an ID. Then unused memory will be returned to the server from any processes that runs on that ID.
Is there a similar setting on Linux. On our Linux server, the process memory usage keeps growing. This is because,eventhough there is memory available from previous run of the program. the program expects contiguous memory blocks which is not available hence it goes back to the physical memory and asks for more. This results in memory growing for ever slowly.
On AIX when this mallocoptions=disclaim is set, unused memory is returned after the application stops and memory is got back form physical memory each time. I know it is a performance hit but it is better than a holding memory for nothing.
If a process is terminated, all of its memory will be reclaimed by the OS. If your system continuously asks for more memory, it might have a memory leak. You can use a tool called Valgrind to check for this.
The way the application runs is, the process is always running. It's multi threaded. The threads use memory and returns back
To process. Next time the thread processes, it requires memory but the memory returned is not good because it is fragmented. It needs contiguous memory. Hence the process gets more memory. This happens over and over again causing memory spike. If there was a way the process could return memory that wud be great.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.