Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

setup.sh writes incorrect values to /etc/sysctl.conf on linux #385

Open
zenspider opened this issue Apr 6, 2015 · 1 comment
Open

setup.sh writes incorrect values to /etc/sysctl.conf on linux #385

zenspider opened this issue Apr 6, 2015 · 1 comment
Labels

Comments

@zenspider
Copy link
Contributor

Specifically, setup.sh writes the following:

kernel.shmmax=776002560
kernel.shmall=189453

but dynamically tunes them to be:

kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288

This means that running install.sh will actually work, but if you reboot the machine you'll get a system that fails when running 'update.sh. This failure has NO logging and NO hints as to what the problem is. Runningsetup.shwill dynamically tune and subsequentupdate.sh` runs will work.

I'll look into why these values are written out later, when I have a fresh system to work on.

@zenspider zenspider self-assigned this Apr 6, 2015
@zenspider zenspider added the Tools label Apr 6, 2015
@Monty
Copy link
Member

Monty commented Apr 7, 2015

I just looked at master https://github.com/MagLev/maglev/blob/master/setup.sh
It logged both the dynamic tuning and what it was updating in /etc/sysctl.conf
Is sysctl.conf still used on reboot? Seems like at least on Macs it was being deprecated.

Here's the relevant code:
echo "[Info] Increasing max shared memory segment size to $shmmaxNewMB MB"
[[ $PLATFORM == "Linux-x86_64" ]] && sudo bash -c "echo $shmmaxNew > /proc/sys/kernel/shmmax"

case "$PLATFORM" in
Linux-x86_64)
echo "# kernel.shm* settings added by MagLev installation" > /tmp/sysctl.conf.$$
echo "kernel.shmmax=cat /proc/sys/kernel/shmmax" >> /tmp/sysctl.conf.$$
echo "kernel.shmall=cat /proc/sys/kernel/shmall" >> /tmp/sysctl.conf.$$

echo "[Info] Adding the following section to /etc/sysctl.conf"
cat /tmp/sysctl.conf.$$
sudo bash -c "cat /tmp/sysctl.conf.$$ >> /etc/sysctl.conf"
/bin/rm -f /tmp/sysctl.conf.$$

@zenspider zenspider removed their assignment Aug 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants