NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Retired_Member
Sep 02, 2014NETGEAR ReadyNAS memory exhaust
Hello,
i own ReadyNAS 312 from Netgear.
I have upgraded RAM from 2GB to 4GB using guides from the internet and also using SO-DIMM DDR3 module that has been reccommended from users as a supported one.
(i have bought same RAM module as in article here http://ptarmiganlabs.wordpress.com/2013/08/16/add-more-ram-memory-to-readynas-rn312/)
It works flawless but with one huge problem.
After reboot, there is 400MB of RAM used, 3,6GB free normally. Also 1-10 minutes after reboot.
If i wait some more time, ammount of used RAM increases (megabyte by megabyte, slowly) and after few hours ( always before 20-24h from reboot ) unit gets into this state: 4GB ram used, 40-60KB free.
ADDONS INSTALLED:
PHP
MySQL
PHPMYAdmin
Teamspeak (for 1-3 users at most at time)
+htop (improved top command)
i am hosting 3 wesites, only 1 of them has files uploaded and is active and at most 1 or 2 people visit it !daily!. I have checked also SQL database using PHPMyadmin, it looks like everything is o.k and looks normally. Still i can turn these websitess off to test. Also i can mess with addons (apps), i can deny or uninstall them for testing purposes..
RUNNING PROCCESSES
if i run "TOP" from SSH console (using PUTTY on Windows) there are normal processes only with not much that 1 percent of memory consumption ALL of them TOTAL.
but if i run "HTOP" from SSH console, which is improved top command, i see some proccesses have "multiplied" or "cloned themselves". Example:
I see 20 proccesses of Mysql (all same command), consuming 1 percent of RAM each (!!!!!!!!!!).
I see same with Teamspeak, around 20-30 proccesses (all same command), each consuming 1 percent of RAM.
Same with one more app i think.
if i count good, 20+30+20 + some more percents is 100% of ram consumed.. but how can this happen? And how to solve it?
BEHAVIOUR
I have to say, that my NAS is still acting normally even after all free memory is utilised. (web access works, all services work ...)
I WILL ADD SCREENSHOTS VERY SOON (OF TOP AND HTOP and all proccesses running on my NAS)
I will post screenshots soon. I need help or explain if this is normal behaviour or not.
i own ReadyNAS 312 from Netgear.
I have upgraded RAM from 2GB to 4GB using guides from the internet and also using SO-DIMM DDR3 module that has been reccommended from users as a supported one.
(i have bought same RAM module as in article here http://ptarmiganlabs.wordpress.com/2013/08/16/add-more-ram-memory-to-readynas-rn312/)
It works flawless but with one huge problem.
After reboot, there is 400MB of RAM used, 3,6GB free normally. Also 1-10 minutes after reboot.
If i wait some more time, ammount of used RAM increases (megabyte by megabyte, slowly) and after few hours ( always before 20-24h from reboot ) unit gets into this state: 4GB ram used, 40-60KB free.
ADDONS INSTALLED:
PHP
MySQL
PHPMYAdmin
Teamspeak (for 1-3 users at most at time)
+htop (improved top command)
i am hosting 3 wesites, only 1 of them has files uploaded and is active and at most 1 or 2 people visit it !daily!. I have checked also SQL database using PHPMyadmin, it looks like everything is o.k and looks normally. Still i can turn these websitess off to test. Also i can mess with addons (apps), i can deny or uninstall them for testing purposes..
RUNNING PROCCESSES
if i run "TOP" from SSH console (using PUTTY on Windows) there are normal processes only with not much that 1 percent of memory consumption ALL of them TOTAL.
but if i run "HTOP" from SSH console, which is improved top command, i see some proccesses have "multiplied" or "cloned themselves". Example:
I see 20 proccesses of Mysql (all same command), consuming 1 percent of RAM each (!!!!!!!!!!).
I see same with Teamspeak, around 20-30 proccesses (all same command), each consuming 1 percent of RAM.
Same with one more app i think.
if i count good, 20+30+20 + some more percents is 100% of ram consumed.. but how can this happen? And how to solve it?
BEHAVIOUR
I have to say, that my NAS is still acting normally even after all free memory is utilised. (web access works, all services work ...)
I WILL ADD SCREENSHOTS VERY SOON (OF TOP AND HTOP and all proccesses running on my NAS)
I will post screenshots soon. I need help or explain if this is normal behaviour or not.
7 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee RetiredWhat is the output of the following?:
# free - unless something else is occurring, it is most likely working as designed.
unused memory is used as cache for all sorts of things, like disk read/writes and various processes can use more memory to run more efficiently.
edit; with all the duplicate processes, it sounds like something may be re-launching those processes when it should not be. - xeltrosApprenticeYour setup is a typical 512Mb to 1Gb setup, 4Gb is already overkill.
what does cat /proc/meminfo show ?
If the swap is shown unused with the "free -h" command you have nothing to worry about. Linux doesn't work like windows.
You could also do this "echo 3 > /proc/sys/vm/drop_caches", it will clear all caches, but I'm pretty sure you won't see any speed improvement (maybe the contrary since it may or may not have to pull things back from the HDD depending on what is cached).
There are a few processes that are launched several times on purpose (apache mainly but also other processes for multithread purpose). I wouldn't worry about them except if you installed them yourself.
For mysQL, TS and things like that, check your config they may spawn a process by user connceting. I don't use htop, does top show the same ? - Retired_MemberHello, thank you for your advices..
I just have seen this tutorial earlier (link below), saying that i could upgrade default 2GB of ram inside ReadyNAS to 4GBs. I thought it will be better, so i bought the memory module at ebay as brand new for cheap price. I plan adding only USB TV TUNER in a future along with DVBlink server for R6. Because I thought, that handling dual DVB TUNER and channels and streaming it inside my home network (to certain PCs), will be cpu and mem consuming.. maybe not.
http://ptarmiganlabs.wordpress.com/2013/08/16/add-more-ram-memory-to-readynas-rn312/
I have made 2 screenshots meanwhile, here they are:
1st: top command
https://www.dropbox.com/s/zuq5yrdk6nhrle6/Screenshot%202014-09-02%2018.56.26.png?dl=0
2nd: htop command, proccesses sorted by mem in %
https://www.dropbox.com/s/vcevi79kzyccf8g/Screenshot%202014-09-02%2018.58.05.png?dl=0
Forum didnt accepted images directly, you have to copy and paste urls into your browser. Sorry for inconvnience..
linux command "free" outputs this:
root@NAS:~# free
total used free shared buffers cached
Mem: 4035472 3988500 46972 0 72 3764676
-/+ buffers/cache: 223752 3811720
Swap: 523708 0 523708
If memory is consumed by pre(caching) standartly, this data above and also below, should be ok. Can you confirm? I dont know if this is normal linux and ReadyNAS 312 behaviour. If it is.. i just worry too much :-D
linux command "cat" outputs this:
root@NAS:~# cat /proc/meminfo
MemTotal: 4035472 kB
MemFree: 47896 kB
Buffers: 72 kB
Cached: 3762440 kB
SwapCached: 0 kB
Active: 2002972 kB
Inactive: 1923676 kB
Active(anon): 105188 kB
Inactive(anon): 65456 kB
Active(file): 1897784 kB
Inactive(file): 1858220 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 523708 kB
SwapFree: 523708 kB
Dirty: 14588 kB
Writeback: 0 kB
AnonPages: 164404 kB
Mapped: 33720 kB
Shmem: 6240 kB
Slab: 34540 kB
SReclaimable: 21716 kB
SUnreclaim: 12824 kB
KernelStack: 1624 kB
PageTables: 10064 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2541444 kB
Committed_AS: 850148 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 2784 kB
VmallocChunk: 34359726324 kB
DirectMap4k: 3008 kB
DirectMap2M: 4182016 kB
Htop and top output same data but Htop is more detailed and with various data sorting options. (It comes from the "available applications" in webadmin of my ReadyNAS 312)
Yes, i come from windows OS. I dont know linux very much, so i expect windows behaviour, sometimes maybe where i should'nt. I know only basic linux commands and those commands useful for my ReadyNAS (like for installing TeamSpeak server, editing cron..). Thanks for your help i appreciate it. - free and cat and top looks pretty normal.
You can see from the 'cached' field that alot of the otherwise unused memory is being used cache of some sort.
I dont' know enough about htop to interpret the seemingly multiple duplicate processes being displayed, these may be simply the threads assigned to the main process (so the server can handle multiple things simulaniously), or it could be some kind of script or whatever starting multiple instances when it should be just 1 (or only a small few).
In any case, you can see that the 'swap' file is not being used, so you are in no danger of running out of physical ram. - xeltrosApprenticeLooking at your htop, it seems that mysql only runs one process. All the processes have the same pid file, they shouldn't be running without that file, so 1 file = 1 process id = 1 process. More over top shows only one mysql process. A script running several process is unlikely unless you did it yourself and your memory doesn't reflect the fact that several processes are running.
Your memory looks pretty normal to me. You got 3.75Gb cache, so they will be instantly freed if more memory is needed. The number is confirmed by both free and /proc/meminfo. No swap used. - Retired_MemberHello, thank you for your replies.
Ok, i understand that everything should be ok and working as expected in linux OS. Thanks for explanations.
I have threw out "Htop" application, altough it works good and tried "linux-dash" that works perfect (i like big dashboard) and also shows 96 percents memory free and 4 percents consumed.
Problem solved.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!