Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
hello all;
I am running a containerized application which is consist of micro-services , what I'm facing that there are a lot of those micro-services crashed after 5 hours of working and when I traced the logs the error was leak in memory, I checked the memory usage by free command then I noticed a big mount of memory is reserved as buffered/cached ,i tried to clear them by the following command but with no benefit "cached memory stayed as it was" :
sync;/sbin/sysctl vm.drop_caches=1
sync;/sbin/sysctl vm.drop_caches=2
sync;/sbin/sysctl vm.drop_caches=3
sync
please guide me how to force the kernel to free the cached memory.
High cache usage is normal, and usually beneficial - it may also indicate a memory problem, but even if so is merely a symptom, not the actual problem. Concentrate on finding and fixing the leak rather than the symptom that is telling you that you may have a real problem.
If you haven't already, go read linuxatemyram.
Post your /proc/meminfo for a better indication of memory allocation. Let's see the OOM messages as well.
High cache usage is normal, and usually beneficial - it may also indicate a memory problem, but even if so is merely a symptom, not the actual problem. Concentrate on finding and fixing the leak rather than the symptom that is telling you that you may have a real problem.
If you haven't already, go read linuxatemyram.
I had to learn the Linux way of doing this years ago and despite telling others in my organization about it they still immediately send me a screen shot of "free" outpout to "prove" the memory is all in use. I like your link - maybe I'll remember it to send to them the next time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.