Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Get confused about how to calculate SHMMAX and SHMALL on Linux.

xportMar 16 2013 — edited Mar 17 2013
Hi guys,

thanks for your time over here.

recently, I'd read the linux kernel header file '/usr/include/linux/shm.h' and seen something of the macro definitions for SHMMAX and SHMALL, it looks like these:

-----
/*
* SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
* be increased by sysctl
*/

#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
#define SHMMIN 1 /* min shared seg size (bytes) */
#define SHMMNI 4096 /* max num of segs system wide */
#define SHMALL (SHMMAX/getpagesize()*(SHMMNI/16))
#define SHMSEG SHMMNI /* max shared segs per process */

-----

did you see the SHMALL = SHMMAX/getpagesize()*(SHMMNI/16)?

so if PAGE_SIZE was set to 4096, we can get SHMALL = SHMMAX/16 based on the above formular.

but I found acturally the system did NOT run as the macro definitions, because sysctl -a output display like these:

-----
kernel.shmmax = 1073741824
kernel.shmall = 262144
kernel.shmmni = 4096
-----

did you see that shmall had been set by SHMMAX/PAGE_SIZE in pages.

Finally, I'm getting confused why the acctually behavior was not like the kernel header files, and how to calculate the two kernel parameters in real word.

thanks for your help.

Comments

Rmanus-Oracle

There are so many typos in your problem description that it is difficult to say what you did right or wrong

step 1 shows "/export/Repository/RepoSolaris11/"

but step 2 shows "/Repository/RepoSolaris11/"

step 3 shows  URL http://myhostname/...

but error shows URL http://myhostnam/...

have you checked that the package in error was present in the repo ?

     pkgrepo list -s http://myhostname/S11MainRepo library/python/pygobject-27

     it should report

    PUBLISHER NAME                                      O VERSION
    solaris   library/python/pygobject-27                 2.21.3,5.11-0.175.3.0.0.26.0:20150705T203156Z

-- Renaud

shirishukla

Sorry my mistake to hide my hostname corrected this now .

Getting this error what URL you mentioned above

# pkgrepo list -s http://myhostname/S11MainRepo/library/python/pygobject-27

pkgrepo: http protocol error: code: 404 reason: Not Found

URL: 'http://myhostname/S11MainRepo/library/python/pygobject-27/versions/0/'

But can this below .

# pkgrepo list -s http://myhostname/S11MainRepo | grep pygobject-27

solaris   library/python/pygobject-27                     2.21.3,5.11-0.175.3.0.0.26.0:20150705T203156Z

Am not sure but, when I browse http://myhostname/S11MainRepo/solaris/manifest it says below error .

400 Bad Request

Missing version

# pkg install pkg://solaris/library/python-2/subversion

Errors were encountered while attempting to retrieve package or file data for

the requested operation.

Details follow:

http protocol error: code: 404 reason: Not Found

URL: 'http://myhostname/S11MainRepo/solaris/manifest/0/service%2Fpostrun@1.0%2C5.11-0.175.1.0.0.18.0%3A20120611T223120Z' (happened 4 tim

Rmanus-Oracle

You missed a space in the command I gave you earlier.

Anyway, you cannot browse  for http://myhostname/S11MainRepo/solaris/manifest

Can you browse for

http://myhostname/S11MainRepo/solaris/manifest/0/service%2Fpostrun@1.0%2C5.11-0.175.1.0.0.18.0%3A20120611T223120Z

and

http://myhostname/S11MainRepo/solaris/info/0/service%2Fpostrun@1.0%2C5.11-0.175.1.0.0.18.0%3A20120611T223120Z

shirishukla

# pkgrepo list -s http://myhostname/S11MainRepo library/python/pygobject-27

PUBLISHER NAME                                          O VERSION

solaris   library/python/pygobject-27                     2.21.3,5.11-0.175.3.0.0.26.0:20150705T203156Z

For both URL Not Found

The requested URL /S11MainRepo/solaris/manifest/0/service/postrun@1.0,5.11-0.175.1.0.0.18.0:20120611T223120Z was not found on this server.


The requested URL /S11MainRepo/solaris/info/0/service/postrun@1.0,5.11-0.175.1.0.0.18.0:20120611T223120Z was not found on this server.

Rmanus-Oracle

I suspect your repo is not complete because the URL should be available as with

http://pkg.oracle.com/solaris/release/manifest/0/service/postrun@1.0,5.11-0.175.1.0.0.18.0:20120611T223120Z

shirishukla

Have reran pkgrecv again and now can access below now .

http://myhostname/S11MainRepo/solaris/manifest/0/service/postrun@1.0,5.11-0.175.1.0.0.18.0:20120…

# pkgrecv  -s https://pkg.oracle.com/solaris/support/ -d /Repository/RepoSolaris11/ --key /root/Solariskeys/pkg.oracle.com.key.pem --cert /root/Solariskeys/pkg.oracle.com.certificate.pem -m all-timestamps '*'

Processing packages for publisher solaris ...

Retrieving and evaluating 19775 package(s)...

But still getting same error

shirishukla

Still stuck on this

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 14 2013
Added on Mar 16 2013
7 comments
110,434 views