Memory cached decrease

Hello,

Cached Memory of my system increase all days , after 5 days , increase to 39 % , my question is ¿is possible free the cached memory?

Thaks

don't perform any activities on the router, and cache will remain low.

why do you want to free it, in the 1st place ?

It will be freed when somebody needs it.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board

{
        "kernel": "5.15.167",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "QNAP 301w",
        "board_name": "qnap,301w",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "ipq807x/generic",
                "description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
        }

}

I think I'm having problems with memory overflow

1 Like

on a device with 1GB RAM ?

not very likely, unless you've installed some memory intensive features.

It has happened for specific devices from time to time for different reasons.

But we need two answers.

  1. Does it stop increase at any level or does it go all the way to OOM?
  2. What actual service is filling the memory?
  1. vm.min_free_kbytes=32k keeps 32MB free discarding cache
  2. you said it 10x - block device cache.

Please post output of free command
Or get more detailed view using e.g. htop

              total        used        free      shared  buff/cache   available
Mem:         889716      322592      139220      309420      427904      204072
Swap:             0           0           0

I don´t know about htop

tks

You got 400+MB cache, it'll get deallocated if required, what's the actual problem?

This is normal and expected, and freeing cached memory will solve absolutely nothing at all. Just you explain what is the issue exactly, and we try to find a solution together.

1 Like

Cache is an efficient way to make use of otherwise unused memory. Old data stays in cache because that memory has not been allocated to any process. If and when a process requires more memory than what's currently free, the kernel will discard the least used cached data and allocate that now free memory to the process.
In other words, plain free memory is useless as it doesn't participate to system performance. Whereas cached memory may or may not accelerate process and can be freed at any time for allocation.

3 Likes