IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Shared Memory Limitations in Linux
I'm trying to allocate more shared memory to run a database.

This is on RedHat 7.1.

When I edit sysctl.conf through the Linux GUI interface, it keeps setting my max shared memory segment size down to 32 meg, but it seems I can set my total shared memory to any value.

Is there a reason for this? If I need a larger shared memory segment, am I going to have to do some uglies deep inside the kernel code to get them? I really don't want to go there...

Also, my database logs are telling me that I'm running out of semaphores. And when I try to stop the database it tells me there aren't enough resources to stop the DB. Finally, I shut down some other processes using shared memory, and the database shut down.

I'm used to the HP/Sun way of doing this with names like shmmax, msgseg, msgmap, msgmni, msgsz, semmni, semmap, semmns, semmnu, shmseg, shmmni.

In HP, we used SAM and edited the values and rebooted the system. In Sun, there was a command line tool (sysconf?).

I see the sysctl.conf in Linux, but is there something more I'm missing here??? I also set the signals from 1024 to 2048.

Glen Austin
New Up to 1GB under 2.4 kernel
But its limited to the value of SHMMAX with which the kernel was compiled. SHMMAX is defined in shmparam.h.

However, if I read the docs correct, this value is the per-segment limit, not the grand total. The number of segments is capped by SHMALL. So if your DB can be taught to allocate more than one segment you can avoid recompiling.
New SHMMAX, SHMALL
I have SHMMAX set to 32 meg and SHMALL set to 256 meg. I'll take a look at the .h file.

We may remove some of the 486 code from the kernel to make it smaller, too, if we decide to recompile.

Thanks,

Glen Austin
New linux/shm.h for i386
It seems not all architectures store SHMMAX in shmparam.h. For i386, they are defined in linux/shm.h instead. I didn't have all the kernel sources handy earlier. Sorry for the wild goose chase.

But the documentation does seem to conflict. shm.h gives the impression that SHMMAX is a default which can be adjusted through sysctl; the kernel docs claim its the max. segment size.
     Shared Memory Limitations in Linux - (gdaustin) - (3)
         Up to 1GB under 2.4 kernel - (scoenye) - (2)
             SHMMAX, SHMALL - (gdaustin) - (1)
                 linux/shm.h for i386 - (scoenye)

Powered by squads of nuclear super soldiers!
41 ms