NanoPi R4S 4GB - RAM Used and Cached Full

This has never been an issue in the past. The only new thing I'm doing with this setup is sharing a 2TB Toshiba Canvio Basics USB3 hard drive VIA Samba. It seems like the RAM fills up and just never gets released. Is this a reporting issue or a real issue? I'm not noticing any symptoms as of yet but this is a 4 hour old fresh install. Any ideas?

Are you using samba4? Try ksmbd instead.

1 Like

Damn, they got you working overtime on here. Nice to see you again. Yes, I am using Samba4 as per:

Just did steps 1, 2 and 3. I tried ksmbd on a previous fresh attempt but the performance was awful. Samba4 works great except for this issue (or perhaps non-issue). I look in the Processes tab and sort by Memory Usage and only 5 things are using 1% memory each. I'm not sure what to believe.

I don't use either of these, but I do know that samba4 is extremely resource intensive (both install size on the persistent storage and RAM footprint) and tends to have issues on many devices. ksmbd is much smaller, but I'm not sure about performance.

1 Like

Would it be safe to assume this is just Cached memory not being released after use? What would give me a more accurate realtime accounting of usages VIA LuCi (or something GUI based) so I can nail this thing down before I go tinkering again? Thanks!

Honestly, I don't know. Play around and see what happens, I guess.

1 Like

OK, well what do you think about this?

Screenshot 2024-06-22 214248

If I run:

sync; echo 1 > /proc/sys/vm/drop_caches

I get:

So what if I just automatically ran that command somewhere, somehow every so often? Would that be stupid?

You've got ~3.8GiB of RAM available. I don't see any problems.

1 Like

I do now after running that command. My question is...does that command mess something up if I set it to execute every so often?

In other words, only about 68 MB of your RAM are actually used, so what's the problem?

'All' free RAM being used for caching is not unexpected, that's its whole purpose, and will be freed whenever the RAM is needed.

Please copy'n'paste into a codebox for textual output, instead of image based screenshots.

1 Like

It used to look like this before I ran that command:

Is LuCi reporting information to me incorrectly or am I just reading it incorrectly?

After a little research, it seems as if it were a little of Column A and a little of Column B. Samba caches up RAM for transfers and LuCi reports that the Cached Memory is at full capacity, which it doesn't fully dump on it's own but waits for something to call for it. What threw me off is the Used Memory bar being full in conjunction with that. As it presents no errors and doesn't seem to cause any issues, clearly this is just a case of me looking at LuCi wrong.

Sorry for wasting your time. I'll mark this as Solved unless something comes up in the next few days.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.