Issue with Increasing the Data Segment size programmatically - HP UX
This is a discussion on Issue with Increasing the Data Segment size programmatically - HP UX ; Data Segment size for a process on HPUX 11.11 box is set to 64 MB by
default. My new application needs the Data Segment size set to atleast
256 MB. After setting "maxdsiz" kernel tunable parameter to 256 MB
using ...
-
Issue with Increasing the Data Segment size programmatically
Data Segment size for a process on HPUX 11.11 box is set to 64 MB by
default. My new application needs the Data Segment size set to atleast
256 MB. After setting "maxdsiz" kernel tunable parameter to 256 MB
using SAM and rebooting the HPUX box ( test machine ), everything
worked fine. i.e; Data Segment size is set to 256 MB.
The problem faced here is - I am not able to increase the Data Segment
size in my application using "Setrlimit" on resource "RLIMIT_DATA". I
can't afford to reboot the production system after setting "maxdsiz"
parameter.
Is there any workaround or any other way to increase the Data Segment
size programmatically ? It would be great if some one can help me out
with this.
-
Re: Issue with Increasing the Data Segment size programmatically
Kishore wrote:
> The problem faced here is - I am not able to increase the Data
> Segment size in my application using "Setrlimit" on resource
> "RLIMIT_DATA". I can't afford to reboot the production system after
> setting "maxdsiz" parameter.
> Is there any workaround or any other way to increase the Data
> Segment size programmatically ? It would be great if some one can
> help me out with this.
Unless the kernel tunable is a "dynamic" one, the only way to get it
increased includes a reboot. A number of kernel tunables are dynamic
in 11.11 (11iv1) and even more are in 11iv2 (11.23). Manpages for
kctune/kmtune will likely say which are which.
If you cannot raise the bridge by rebooting the production server, you
will have to find a way to lower the river by reducing the memory
requirements of your new application.
If this server is that mission critical, I would expect it to be part
of a ServiceGuard cluster. That being the case, perhaps the way out
would be to alter the settings so the backup system is set as you need
it, fail over to the backup and run the new application there, then
set the primary system(s) (in turn) and fail-back.
rick jones
Being a networking guy, I can never remember if memory allocated via
shm_get or mmap counts against maxdsiz or not... I suppose some simple
test cases could determine that easily enough. Getting a program
modified to use such memory might not be all that easy depending on
whether or not there are alternate allocators out there to hide it
from the application... but that would be at best a kludge
--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway... 
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...