Showing posts from August, 2007

Windows Live Writer...Lets see what's Improved.

Hmm.. making this post via Windows Live writer. It automatically detected this blog by just asking for the url (which I gave as! I had to give my Google credentials to it, which I'm still not comfortable with.One glitch. it said it can't upload the image. :( same issue as last time.. not fixed yet.

Linux IPC and Limits

Note: POSIX implementation provides better and cleaner api to IPC compared to System V. Prefer using POSIX api if you are known to be running on 2.6 or later kernel.

System V IPC implementation on Linux includes Shared memory, Semaphores and Message queues. There are system imposed limits that are important to keep in mind when developing application/services in Linux.

To know the limits use ipcs command. For example on my system:
[root@f7 ~]# ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

Or via sysctl interface:
kernel.shmmni = 4096
kernel.shmall = 2097152