What's new

Asus Merlin Default Setting Question

  • 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!

johnathonm

Regular Contributor
Hello everyone,

I hope you are well. Before I get blasted by the crew which will tell me "Linux knows how to manage memory better than you ever will" I have a question regarding several of the default settings within the firmware as based on IBM's outline of how the settings should be or are calculated.

The IBM calculation's are listed here: https://www.ibm.com/support/knowled...m.ibm.db2.luw.qb.server.doc/doc/t0008238.html

When doing an output of the system variables using busybox's sysctl -a I saw the following:

kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 4096

I also saw this: kernel.sem = 32000 1024000000 500 32000

These settings, seem a bit high and/or off based on what IBM was listing as the calculations. I could be totally wrong, so please understand I am just asking a question as to what seems anomalous.

Thank you,

J
 
I suspect those are bogus values (18446744073692774399, really :D. That is FFFFFFFFFEFFFFFF. So it's probably meant to be FFFFFF which is 16M). What router model do you have? sysctl isn't even present on my router.
Code:
# sysctl -a

-sh: sysctl: not found
# cat /proc/sys/kernel/shmall
2097152
# cat /proc/sys/kernel/shmmax
33554432
# cat /proc/sys/kernel/shmmni
4096
# cat /proc/sys/kernel/sem
250     32000   32      128
 
Last edited:
I suspect those are bogus values (18446744073692774399, really :D. That is FFFFFFFFFEFFFFFF. So it's probably meant to be FFFFFF which is 16M). What router model do you have? sysctl isn't even present on my router.
Code:
# sysctl -a

-sh: sysctl: not found
# cat /proc/sys/kernel/shmall
2097152
# cat /proc/sys/kernel/shmmax
33554432
# cat /proc/sys/kernel/shmmni
4096
# cat /proc/sys/kernel/sem
250     32000   32      128

Hey Colin,

Through busybox via entware sysctrl is available. I am running the latest AC86U-Extreme edition with Merlin's beta firmware.

I believe it has 512 MB of Ram. What should those values actually be?

Thanks,

J
 
Here is the full output from sysctrl, modified.

https://pastebin.com/k8sP0hSY

And here is the output from my cat's, modified:

XXXX@RT-AC86U-2B48:/jffs/scripts# cat /proc/sys/kernel/shmall
1073741824

XXXX@RT-AC86U-2B48:/jffs/scripts# cat /proc/sys/kernel/shmmax
536870912

XXXX@RT-AC86U-2B48:/jffs/scripts# cat /proc/sys/kernel/shmmni
4096

XXXX@RT-AC86U-2B48:/jffs/scripts# cat /proc/sys/kernel/sem
32000 1024000000 500 32000

Here is a the pre-edit, there are some small tweaks, sysctrl output.

https://pastebin.com/SPCK8uDE
 
Well the output you just posted shows:

kernel.shmall = 1073741824
kernel.shmmax = 536870912
kernel.shmmni = 4096

So that's different from what you originally posted.
 
Personally I wouldn't trust third party software like entware to be 100% accurate. I'd rely on the real values reported by /proc/sys/kernel.

Those values look about right. shmmax matches your RAM size. The other values are "suitably large". They're always vastly overestimated, because there's no real penalty in doing so. It's not like you're actually "using" that amount of memory or semaphores, you're just putting an upper limit on it.

Either way, you're not going to be running some vast multi-user relational database on your router so it's pretty irrelevant what they're set to.
 
Personally I wouldn't trust third party software like entware to be 100% accurate. I'd rely on the real values reported by /proc/sys/kernel.

Those values look about right. shmmax matches your RAM size. The other values are "suitably large". They're always vastly overestimated, because there's no real penalty in doing so. It's not like you're actually "using" that amount of memory or semaphores, you're just putting an upper limit on it.

Either way, you're not going to be running some vast multi-user relational database on your router so it's pretty irrelevant what they're set to.

You're right. I am obsessing over the amount of free ram on the router. I am pushing near 100% utilization with just stock settings and skynet. I have an SSD attached to the router over USB 3 and I wish I could see some of this get paged out. I am not sure what to do as it could very easily hit an OOM situation.

Do you have any advice or should I just chill?

Thanks man.

J
 
Just chill probably.:) Having your memory at nearly 100% is a good thing. Unused RAM is wasted RAM. If you're moving files to and from your SSD then it will try and keep as much of that data as possible buffered in memory. Samba in particular likes to do this in my experience.;)

That's not to say there couldn't be a problem, but if you run out of memory you'll know about it quickly enough.

Have a look at the output of free to get a better idea of how the memory is being used.
 
Just chill probably.:) Having your memory at nearly 100% is a good thing. Unused RAM is wasted RAM. If you're moving files to and from your SSD then it will try and keep as much of that data as possible buffered in memory. Samba in particular likes to do this in my experience.;)

That's not to say there couldn't be a problem, but if you run out of memory you'll know about it quickly enough.

Have a look at the output of free to get a better idea of how the memory is being used.

Then chill I shall :). The question is now what can I fill that memory up with...
 

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!

Staff online

Top