LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-18-2019, 02:52 AM   #1
ibrahimjaradat
LQ Newbie
 
Registered: Sep 2019
Posts: 1

Rep: Reputation: Disabled
Cached memory keeps growing


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.
 
Old 09-18-2019, 03:32 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
1 members found this post helpful.
Old 09-18-2019, 09:10 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by syg00 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Growing Pains, a platformer where you're constantly growing is now on Linux LXer Syndicated Linux News 0 09-10-2019 11:33 PM
Linux memory management: Real memory or Cached buffers? gubbu Linux - Server 2 10-01-2010 01:58 AM
MySQL ibdata1 growing and growing and growing and... jnojr Linux - Software 1 07-20-2009 07:11 PM
X utilaziion is growing and growing amirb Linux - Desktop 2 05-28-2007 03:55 AM
Increasing the amount of cached memory balteo Linux - General 1 09-16-2005 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration