illumos-joyent icon indicating copy to clipboard operation
illumos-joyent copied to clipboard

LX add missing kernel parameter mappings

Open blackwood821 opened this issue 3 years ago • 4 comments

We would like to run third-party software on LX that requires a handful of Linux kernel parameters to be set. The full list is shown at https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/minimum-parameter-settings-for-installation.html#GUID-CDEB89D1-4D48-41D9-9AC2-6AD9B0E944E3. From that list there is no mapping for the following parameters in the current LX emulation code:

semmsl
semmns
semopm
semmni
panic_on_oops
rmem_default
rmem_max
wmem_default
wmem_max

Which can be seen from this output on a LX image running kernel_version 4.1.12:

[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep semmsl
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep semmns
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep semopm
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep semmni
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep shmall
kernel.shmall = 1048576
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep shmmax
kernel.shmmax = 4294967295
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep shmmni
kernel.shmmni = 4096
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep panic_on_oops
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep file-max
fs.file-max = 131072000
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep aio-max-nr
fs.aio-max-nr = 65536
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep ip_local_port_range
net.ipv4.ip_local_port_range = 32768       65535
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep rmem_default
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep rmem_max
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep wmem_default
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -a | grep wmem_max
[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]#

Looking at rmem_max and wmem_max for example, the Linux commands to set these parameters are:

sysctl -w net.core.rmem_max=<value>
sysctl -w net.core.wmem_max=<value>

But we encounter the following error:

[root@520d7a1b-25a1-cea9-84fc-fb445f9b3f94 ~]# sysctl -w net.core.rmem_max=2096304
sysctl: cannot stat /proc/sys/net/core/rmem_max: No such file or directory

We were able to set the equivalent underlying illumos kernel parameter with the command below but the issue is that the LX emulation lies to the Linux system call and returns some arbitrary value even though we have changed the kernel param in illumos under the hood.

/native/usr/sbin/ndd -set /dev/udp udp_max_buf 2096304

Hoping mappings can be added for these kernel parameters.

blackwood821 avatar Jun 09 '21 16:06 blackwood821

This is something that neirac from IRC was mentioning he would look at, isn't it? It's probably best to file this in the illumos redmine (where he can access it) rather than here. This issue is likely to be missed if it's fixed upstream first.

bahamat avatar Jun 09 '21 21:06 bahamat

@bahamat Yes. I will look into filing it there. Never looked at illumos redmine before.

blackwood821 avatar Jun 10 '21 22:06 blackwood821

The lx brand is not part of illumos-gate. illumos-joyent is the upstream for this feature which makes this the appropriate place.

citrus-it avatar Jun 10 '21 22:06 citrus-it

Oh, that’s right I forgot about that. Ok, when you’re ready go ahead and open the pull request here and mark me as reviewer.

bahamat avatar Jun 10 '21 22:06 bahamat