[SOLVED] after upgrade: /etc/sysctl.conf not read?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] after upgrade: /etc/sysctl.conf not read?

Postby magfan » Mar 12th, '14, 11:16

After upgrading mga3 -> mga4 I discovered that either the file "/etc/sysctl.conf" is not read any more or some values are overwritten after it has been read. I first became aware of this problem when the postgresql server did not start while booting:
Code: Select all
$ FATAL:  could not create shared memory segment: Invalid argument                                                                   
DETAIL:  Failed system call was shmget(key=5432001, size=41205760, 03600).                                                                                 
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 41205760 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.                                                                                                     
        If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.                                                                                                                       
        The PostgreSQL documentation contains more information about shared memory configuration.                                                         

The strange thing is that in "/etc/sysctl.conf" the kernel values are set as follows:
Code: Select all
kernel.shmmax=8589934592
kernel.shmall=2097152

But after booting kernel.shmmax has a wrong value:
Code: Select all
# cat /proc/sys/kernel/shmmax
33554432

How can I solve this problem?
Last edited by magfan on Mar 13th, '14, 13:11, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: after upgrade: /etc/sysctl.conf not read?

Postby ITA84 » Mar 12th, '14, 15:29

I think it's because of a new version of systemd, which uses /etc/sysctl.d instead.

https://www.archlinux.org/news/deprecat ... ysctlconf/

This is from Archlinux, but it should work in Mageia too: simply copy your sysctl.conf settings to a numbered file in /etc/sysctl.d (e.g 99-sysctl.conf), or to separate files.
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

Re: after upgrade: /etc/sysctl.conf not read?

Postby doktor5000 » Mar 12th, '14, 21:57

This is not only the case since Mageia 4, check https://bugs.mageia.org/show_bug.cgi?id=12066
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18070
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: after upgrade: /etc/sysctl.conf not read?

Postby magfan » Mar 13th, '14, 13:10

doktor5000 wrote:This is not only the case since Mageia 4, check https://bugs.mageia.org/show_bug.cgi?id=12066

Maybe I was simlpy lucky and I did not run into that problem before. A long time ago I changed /etc/sysctl.conf because postgresql did not start. After that I never had problems until I upgraded to mga4. That is why I thought it is an upgrade issue with mga4. But thanks to this hint it is working again:
ITA84 wrote:I think it's because of a new version of systemd, which uses /etc/sysctl.d instead.

https://www.archlinux.org/news/deprecat ... ysctlconf/

This is from Archlinux, but it should work in Mageia too: simply copy your sysctl.conf settings to a numbered file in /etc/sysctl.d (e.g 99-sysctl.conf), or to separate files.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron