Memory usage stuck high

Moderator: Lillian.W@AST

pcostax
Posts: 6
youtube meble na wymiar Warszawa
Joined: Wed Jan 11, 2023 4:06 am

Memory usage stuck high

Post by pcostax »

Hi all! hope you can assit me with this issue.

I recently purchased an AS1102T and populated both bays with 4TB NAS hdds from Seagate. Since I purchased it to have a personal cloud but also to run Home Assistant on it, I immediately started adding the apps I found useful.
What I found is that the RAM is constantly above 70~80%, peaking at higher than 90% (which was triggering alarms). Initially I thought this was due to the process of making picture thumbnails, hdd mirroring, etc., so I disabled the alerts.
As the memory use is still high after several weeks, I started to disable all the apps I previously installed (and removed a few), but RAM use is still quite high...
I have now disabled ALL installed apps (even 'ClamAV') and set HDDs to hibernate at 10min. I can hear these hibernate (as they restart if I try to access any file), but activity monitor still shows RAM at 68% (with CPU at 1% and HDD at 0...). The only running process shown is 'top'. Everything else is 'sleeping'.

With all this considered, WHY is RAM usage stuck high, if nothing is using it? Really getting confused with this... :|

ADM version is the latest: 4.2.0.RC81
User avatar
Nazar78
Posts: 2059
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Memory usage stuck high

Post by Nazar78 »

It's most probably cache and buffers, should be ok unless you're running lots of apps for a 1GB RAM. Have a look at the Activity Monitor. You can also look for more details using some commands like `free` or `htop`.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
pcostax
Posts: 6
Joined: Wed Jan 11, 2023 4:06 am

Re: Memory usage stuck high

Post by pcostax »

Thanks for the quick reply!
My issue is that, once I start enabling Home Assistant, DataSync, FFmpeg, Photo Gallery and Sounds/looks good, it often jumps over the 90% threshold and generates alarms... I can keep it disabled, but should the cache and buffers still use such high RAM after several hours of downtime?
Activity Monitor really only shows 'top' running, but I'm not familiar with using commands. Are you using ssh and putty to do that?
User avatar
Nazar78
Posts: 2059
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Memory usage stuck high

Post by Nazar78 »

Yes using SSH. You can always adds up the total memory usage from the Activity Monitor. If you exceeds 50% then there's too much apps running.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
pcostax
Posts: 6
Joined: Wed Jan 11, 2023 4:06 am

Re: Memory usage stuck high

Post by pcostax »

17x 'lighttpd' processes (all sleeping) but the total is around 76Mb. Strangely, adding all processes seems to be around 200Mb and not >600Mb as the memory screen shows (used: 627.43MB / cached: 0.00B / Buffer: 27.78MB / free: 268.86MB). No apps are running at this moment...
I also will try to do an ssh connection with putty for more details, but this is quite annoying... :|
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Memory usage stuck high

Post by father.mande »

Hi,

To clear buffer and cache in memory and see result you can do in a terminal (root or sudo)

free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m

internal free command is limited :
free ... -m = in mebibytes (x 1024) but -b bytes, -k (default) or -g gibibytes can be used as you prefer
Entware free command is the full GNU one (procps-ng-free) with all options

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
pcostax
Posts: 6
Joined: Wed Jan 11, 2023 4:06 am

Re: Memory usage stuck high

Post by pcostax »

Hi,

I tried connecting with ssh and doing that. No luck:
"
free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m
total used free shared buff/cache available
Mem: 924 431 157 15 334 558
Swap: 2044 141 1903
-sh: can't create /proc/sys/vm/drop_caches: Permission denied
"
I've logged in with my own credentials (administrator level), but maybe I need higher permissions? possibly 'root'?
Any other commands I can try to have this better tested? I have stopped all installed apps and uninstalled the ironwolf disk app as well, but HDDs keep showing high use and memory over 70%...

Many thanks for all your help!
Pedro
User avatar
Nazar78
Posts: 2059
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Memory usage stuck high

Post by Nazar78 »

You need privileged access, prefix those commands with `sudo` in front of them or the least recommended way by switching to root, `sudo su -` before running those commands.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
pcostax
Posts: 6
Joined: Wed Jan 11, 2023 4:06 am

Re: Memory usage stuck high

Post by pcostax »

Hi Nazar78,

That helped :)
"
# free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m
total used free shared buff/cache available
Mem: 924 561 158 48 204 526
Swap: 2044 6 2038
total used free shared buff/cache available
Mem: 924 102 765 48 55 660
Swap: 2044 6 2038
"
It got the memory down to 17%, but the disks were still permanently active (read/write). After a restart, disks are still active (same) and the memory went up again to 70%.

I guess I will need to open a ticket with support to troubleshoot this properly... Any other ideas?

Thanks again!
Pedro
User avatar
Nazar78
Posts: 2059
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Memory usage stuck high

Post by Nazar78 »

As I said earlier if the memory is high due to cache and buffers then it's ok, the system will manage but you can't run too much apps.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “[Official] For AS10XX Series”