Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

sybase os_create_region: shmat() Shared memory?

julia_
Occasional Visitor

sybase os_create_region: shmat() Shared memory?

Hi

We are migrating an ASE12.5 production enviroment from a 1GB memory alpha server to a 3GB (3328 MB) alpha server, both running tru64 5.1. But the sybase server is not starting in the new one. The error we get is:

00:00000:00000:2006/10/10 18:39:45.49 kernel os_create_region: shmat(32): Invalid argument
00:00000:00000:2006/10/10 18:39:45.49 kernel kbcreate: couldn't create kernel region.
00:00000:00000:2006/10/10 18:39:45.49 kernel kistartup: could not create shared memory

I have work on the os_create_region errors section described on the SYBASE SQL Server Error Messages doc, but it still does not work. I tried setting the SHM_MAX to 2GB, 3GB and 4GB but nothing.

Anybody knows which is the recommended value for Shm_max, or if I should set others memory variables at Unix, or some ideas to fix it?

Here actual values:

from sysconfig -q ipc:
shm_max = 4278190080
shm_min = 1
shm_mni = 128
shm_seg = 32

from sysconfig -q proc:
max_proc_per_user = 256
max_threads_per_user = 1024
per_proc_stack_size = 8388608
max_per_proc_stack_size = 33554432
per_proc_data_size = 134217728
max_per_proc_data_size = 1073741824
max_per_proc_address_space = 4294967296
per_proc_address_space = 4294967296

from sybase sp_configure "max memory" = 131072

Thanks in advance.

Julia
6 REPLIES
Hein van den Heuvel
Honored Contributor

Re: sybase os_create_region: shmat() Shared memory?

Congrats on getting some more memory. :-)

>> sybase os_create_region: shmat() Shared memory?
Is that the exact error?
Wasn't there a number there?

http://manuals.sybase.com/onlinebooks/group-as/asg1250e/svrtsg/@Generic__BookTextView/53118;pt=53069

You specify : sp_configure "max memory" = 131072
That's in 'pages'.
How big is the logical page size? 8kb?
If so, then that is (only) 1GB.

This would NOT work with: max_per_proc_data_size = 1073741824

I guess I prefer specifing as '1000M', that takes the guessqwork out of the units.

That is also (only) 1GB.
It needs to be (significantly) bigger than the largest shared memory as it needs to address that shm as well as the regular code and data. Bump to 4GB?


Anyway... where the ipc and proc params changed after reboot?
Was "max memory" changed? (I suppose that was the goal!

My favourite value for older Tru64 version for shm_max is 2Gb minus 8Mb: 2139095040 x7F800000
For recent versions 4Gb works fine.

For an older, but similar topic:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=863492


Cheers,
Hein.



Han Pilmeyer
Esteemed Contributor

Re: sybase os_create_region: shmat() Shared memory?

You don't show ipc:ssm_threshold as a kernel parameter that was changed from its default value. With Sybase it must be tuned to 0.

Set ipc:shm_max to values larger than 2 GB (minus the 8 MB) is possible on recent Tru64 UNIX versions (as Hein mentions), but it also requires an API change in the application. I'm not sure if Sybase has been changed. So to be on the safe side, I would stick with the value that Hein suggests.
julia_
Occasional Visitor

Re: sybase os_create_region: shmat() Shared memory?

Hi,

Thanks for the replies

I don't have access to the server today, so tomorrow I will try with:
- set max_per_proc_data_size = 4GB (4294967296)
- set shm_max = 4GB (4294967296)

And about: "Was "max memory" changed?", Yes, it changed the three times

Thanks guys, tell you tomorrow the results.

Julia
Hein van den Heuvel
Honored Contributor

Re: sybase os_create_region: shmat() Shared memory?

The increased max_per_proc_data_size is likely goign to do the job. Can you confirm the sybase pagesize that goes with the sp_configure "max memory" = 131072 ?

>>> tomorrow I will try with:
>> - set shm_max = 4GB (4294967296)
But you already tried 4GB for shm_max?

original question>> I tried setting the SHM_MAX to 2GB, 3GB and 4GB but nothing.

1 GB might have been just a little to small.
2 GB might have been 8MB too big.
Don't try 4GB again.
Try shm_max=2139095040

And if Han says that ipc:ssm_threshold must be 0 for sybase appliaction then you should also make sure this is in place.

Han also wrote:

" Set ipc:shm_max to values larger than 2 GB (minus the 8 MB) is possible... but it also requires an API change in the application."
Ah yes, of course. The application (here Sybase) will need to be able to deal with a size which 'looks' negative when treated as a 32 bit signed integer. If they use 64 bit sizes or 32 bit unsigned, then all should be well.

Hein.
julia_
Occasional Visitor

Re: sybase os_create_region: shmat() Shared memory?

Fixed!

First I tried with
shm_max = (2GB - 8MB)
shm_max = (3GB - 8MB)
shm_max = (4GB - 8MB)

Then:
shm_max = 4GB
shm_seg = 128 (32 originally)
shm_mni = 512 (128 originaly)

But the problem was finally fixed after set ssm_threshold = 0

THANKS A LOT!
Hein van den Heuvel
Honored Contributor

Re: sybase os_create_region: shmat() Shared memory?

Excellent! Thanks for the feedback.

You may want to close the topic as per:

http://forums1.itrc.hp.com/service/forums/helptips.do?#40

Regards,
Hein.