# cannot set ipc sysctl via loader.conf



## fluca1978 (Jan 30, 2012)

Hi all,
in my /boot/loader.conf I've got:


```
# cat /boot/loader.conf
kern.ipc.shmall=16857
kern.ipc.shmmax=69042176
```

but when I start the machine I got:


```
# sysctl kern.ipc.shmall
kern.ipc.shmall: 8192
# sysctl kern.ipc.shmmax
kern.ipc.shmmax: 33554432
```

and I don't have any other setting for the two syctl around, at least I think:


```
# grep "kern.ipc.shmmax" /etc/sysctl.conf
# grep "kern.ipc.shmmax" /etc/defaults/rc.conf
```

Any idea about? Other sysctl in the /boot/loader.conf are working fine, so I guess there is something wrong with only the above two.


----------



## fluca1978 (Jan 30, 2012)

Removing the sysctl settings from /boot/loader.conf and placing them into the /etc/sysctl.conf made the settings available even at reboot. Any idea what I'm doing wrong (i.e., why /boot/loader.conf was not working)?


----------



## RedRat (Feb 1, 2012)

All parameters in loader.conf must be quoted:

```
kern.ipc.shmall="16857"
kern.ipc.shmmax="69042176"
```


----------



## fluca1978 (Feb 2, 2012)

I tried to quote the values, but nothing changed. Moreover, other sysctl without quotes are correctly set.


----------



## RedRat (Feb 2, 2012)

fluca1978 said:
			
		

> I tried to quote the values, but nothing changed.



I have tested it on my 8.2 server, and it doesn't work too. Hm... I think, it must be PR-rd. :-\



			
				fluca1978 said:
			
		

> Moreover, other sysctl without quotes are correctly set.



Because sysctl doesn't require quotes, only loader.conf.


----------



## fluca1978 (Feb 2, 2012)

It seems also /boot/loader.conf does not require any quote, since settings placed there without quotes are working (but not shared memory). I guess there is something about the sysctl that cannot be set at boot time?


----------



## LateNiteTV (Feb 2, 2012)

Maybe because sysctl tunables don't belong in loader.conf...


----------



## kpa (Feb 2, 2012)

Some of them do belong there, like vfs.zfs.arc_max that can not be set after the kernel has started.


----------

