What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

CPU usage on RT-AC68U

Michael Lim

New Around Here
Hi, I'm new to using the Merlin firmware, but I've read a lot of good things about it so I thought I'd give it a try. I flashed the new firmware and cleared NVRAM and reset to factory default before making any configuration changes.

Something I noted was that when you first turn on the router, either from a reboot or a powerdown, the CPU usage for core 1 goes through the roof. It will stay there going up and down between generally 90%-100% usage while core 2 is mostly sitting idle.

The problem is that in my RT-AC68U, this goes on for an extended period of time, half a day if not more, before core 1 starts to slowly come down. Under normal load it should be between 20%-40%. Can anyone tell me if they are see this issue? The problem is that when core 1 is under heavy load, it also affects download and upload speeds. Under full load I'm getting about 15%-20% of the rated speed of my connection.

Am I doing something wrong, or is there something I'm missing in the configuration? I came over from the latest Asus firmware for the RT-AC68U and I am using basically the same settings I used in that firmware.
 
I've not experienced such behaviour with my same model router. You probably won't have checked the cpu usage immediately after restoring to factory default settings, only after reinstatiing all your personal settings. If you are up for it, I'd restore to factory default again, then check cpu usage and slowly reinstate your settings checking cpu usage at each stage. Sod's Law says it'll work perfectly this time around.
 
Am I doing something wrong, or is there something I'm missing in the configuration? I came over from the latest Asus firmware for the RT-AC68U and I am using basically the same settings I used in that firmware.
What router features are you using? USB disc attached? AiProtection, AICloud, USB Application enabled?
Sounds to me like something is running/scanning your router... :rolleyes:
 
Am I doing something wrong, or is there something I'm missing in the configuration? I came over from the latest Asus firmware for the RT-AC68U and I am using basically the same settings I used in that firmware.

First thing if you have a USB attached disk is to check the syslog and see if the router is detecting a problem and running a disk check at boot.

Second thing that comes to mind is if you are using the Media Server and have a large library on a USB attached disk. The router will rebuild the media db at every reboot by default. You can stop this behavior by telnet/ssh to the router and entering

nvram set dms_rescan=0
nvram commit
 
I've not experienced such behaviour with my same model router. You probably won't have checked the cpu usage immediately after restoring to factory default settings, only after reinstatiing all your personal settings. If you are up for it, I'd restore to factory default again, then check cpu usage and slowly reinstate your settings checking cpu usage at each stage. Sod's Law says it'll work perfectly this time around.

I'm using it in my home office... I'll have to find a block of time when nobody needs to use the internet to give this a try. Thanks for the suggestion.
 
What router features are you using? USB disc attached? AiProtection, AICloud, USB Application enabled?
Sounds to me like something is running/scanning your router... :rolleyes:

I know a USB attached disk will cause it to scan for media files, so I don't do that. I do however have a SYNOLOGY 1515+ NAS and it's got like 20TB of storage on it; but it's also connected through a switch that is connected to the ASUS router. I also don't use any of the AiProtection, AiCloud etc. etc. I use it strictly as a router to let my wired and wireless devices get online to access the internet.
 
Last edited:
First thing if you have a USB attached disk is to check the syslog and see if the router is detecting a problem and running a disk check at boot.

Second thing that comes to mind is if you are using the Media Server and have a large library on a USB attached disk. The router will rebuild the media db at every reboot by default. You can stop this behavior by telnet/ssh to the router and entering

nvram set dms_rescan=0
nvram commit

I don't believe I'm using the router as a media server. I have my Synology NAS set up for that. I'll have to try the telnet commands. What's strange is that I never noticed this behavior before when I was on older ASUS firmware. I believe I was using a release that was over a year old before I updated to the latest firmware and then to Merlin.
 
What's strange is that I never noticed this behavior before when I was on older ASUS firmware. I believe I was using a release that was over a year old before I updated to the latest firmware and then to Merlin.
Then really double check the syslog for any USB related errors/disk checks....the file system drivers were changed in the time frame you've given.
 
First thing if you have a USB attached disk is to check the syslog and see if the router is detecting a problem and running a disk check at boot.

Second thing that comes to mind is if you are using the Media Server and have a large library on a USB attached disk. The router will rebuild the media db at every reboot by default. You can stop this behavior by telnet/ssh to the router and entering

nvram set dms_rescan=0
nvram commit
Hi John !

One other short question ..

Why "dms_rescan=0" works in your build but not in Merlin 376.55 ?

In your builds the db is created only once.
Both are ext4 disks, but on 376.55 it always rebuild the complete minidlna db.

How to change this in 376.55 ?

Thanks
 
I have updated to Merlin 378.56_2 which is using a newer version of minidlna.
The problem still persists.

If I use "killall minidlna" the files.db will remain.
Then I can use "service start_dms" and the database still remains.
Like it should be.

But when I do "service restart_dms" the complete .minidlna folder get deleted.
"service stop_dms" will delete the folder as well.

As it looks like the service stop_dms trigger is wiping the folder.

How to check / change the service stop_dms behaviour in detail ?

Thanks
 
Maybe this is the related code ...

https://github.com/RMerl/asuswrt-me...a04e809fd77f4d735/release/src/router/rc/usb.c


// it is called by rc onlyvoid force_stop_dms(void){ killall_tk(MEDIA_SERVER_APP); eval("rm", "-rf", nvram_safe_get("dms_dbdir"));}

In this code he also checks for a file called " file.db" the dms one is called "files.db"
Is this an Syntax error ? See below ...

* if previous dms_dbdir there, use it */ if(!strcmp(dbdir_t, nvram_default_get("dms_dbdir"))) { sprintf(dbfile, "%s/file.db", dbdir_t); if (check_if_file_exist(dbfile)) { strcpy(dbdir, dbdir_t); found = 1;

Maybe I will open a new thread for this topic... ;)

On Johns fork (older minidlna) there are no problems with dms_rescan and .minidlna folder deletion .

Now I should check the corresponding code from John ..
 
It's been a while, but I vaguely remember there was an inconsistency in one of the checks made on the file name for the db file that I also fixed at some point (maybe it was minidlna.db vs .minidlna.db (with a leading dot to denote a a hidden file). As I said, it's been a while.
 
It's been a while, but I vaguely remember there was an inconsistency in one of the checks made on the file name for the db file that I also fixed at some point (maybe it was minidlna.db vs .minidlna.db (with a leading dot to denote a a hidden file). As I said, it's been a while.
Thanks for your reply.

The folder is called .minidlna and the DB is called files.db

The code is searching for "file.db" - no "s".

But why the other command "rm -rf dms_dbdir" in stop void function?

I am no coder - but sounds strange to me.

The Main problem persists - the DB (complete folder) get deleted every service restart or system reboot.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top