Operating System - HP-UX
1748151 Members
3711 Online
108758 Solutions
New Discussion юеВ

Re: ulimit Command Promlem

 
SOLVED
Go to solution
itrc55
Regular Advisor

ulimit Command Promlem

Hi,
I have changed the ulimit for the user dsadm on one of my server. Its only changed IF i su to dsadm from root, but its not changing if i ssh to dsadm.

i want to change the data(kbytes)to unlimited. i edit the /etc/profile and .profile of dsadm user by set this my OS 11.31

ulimit -d unlimited


>id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)

>ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) unlimited
nofiles(descriptors) 63488

>ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 8000


but when i login to server directly with a dsadm user i facing this error and i see limited number for a data.

/etc/profile[132]: ulimit: exceeds allowable limit
${HOME:-.}/.profile[37]: ulimit: exceeds allowable limit

$ id
uid=111(dsadm) gid=107(dstage)

$ ulimit -Ha
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) unlimited

$ ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303

the kctune command output

maxdsiz 1073741824 Default Immed
maxdsiz_64bit 2147483648 2147483648 Immed
maxfiles 8000 8000
maxfiles_lim 63488 63488 Immed
maxrsessiz 8388608 Default
maxrsessiz_64bit 8388608 Default
maxssiz 134217728 134217728 Immed
maxssiz_64bit 1073741824 1073741824 Immed
maxtsiz 100663296 Default Immed
maxtsiz_64bit 1073741824 Default Immed

please i need your support.

Thanks
12 REPLIES 12
Bill Hassell
Honored Contributor

Re: ulimit Command Promlem

unlimited is the same as the kernel parameter maxdsiz. It does not mean that a program can grow larger than this value. Change maxdsiz using kctune and you'll see ulimit also changes.

# ulimit -d
1048576

(now change the maxdsiz value)

# kctune maxdsiz=2000000000
Tunable Value Expression Changes
maxdsiz (before) 2073741999 2073741999 Immed
(now) 2000000000 2000000000

(start a new shell or logout and back in again)

# ulimit -d
1953124

NOTE: Setting maxdsiz larger does not automatically enable a (32 bit) program to access more than 1 GB of RAM. If you need more than 1 GB local (heap) memory, look at EXEC MAGIC and chatr options, or link your program MPAS (Mostly Private Address Space).


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: ulimit Command Promlem

>/etc/profile[132]: ulimit: exceeds allowable limit

Unless you are root, you can only use ulimit to show the values or make things smaller. (Unless they are soft limits.)
itrc55
Regular Advisor

Re: ulimit Command Promlem

Hi,

The dba he want to increase the maxdsiz to be 15 GB instead of 2 GB as our application still raising the below error message.

"XML_PersonBObj,0: Caught exception from runLocally(): APT_BadAlloc: Heap allocation failed."

How i can increase the maxdsiz or maxdsiz_64bit to be 15 GB


Note: the application is 64 bit
Note: we are running heavy jobs which consume a lot of space, so don├в t surprise that we asking for 15 GB

Thanks
Dennis Handly
Acclaimed Contributor

Re: ulimit Command Promlem

>The DBA wants to increase maxdsiz to 15 GB

kctune maxdsiz_64bit=15GB
itrc55
Regular Advisor

Re: ulimit Command Promlem

Hi,

Thanks for your replay but is there any affect when i increase the maxdsiz_64bit to 15GB ?

and this size from Where are taken ? from a ram memory or from ..... .

Thanks
Dennis Handly
Acclaimed Contributor
Solution

Re: ulimit Command Promlem

>is there any affect when I increase the maxdsiz_64bit to 15GB?

If you don't have a lot of swap, you can't really get 15Gb. Also, if EVERY 64 bit process tries to use 15Gb, you will run out of swap.

>this size from where are taken? from a ram memory or?

This is taken from swap. Whether pseudo swap or device swap depends on how much and what type of swap you have and the current load on the system. What does "swapinfo -tam" show?
itrc55
Regular Advisor

Re: ulimit Command Promlem

Hi,

i increase it to 15GB, but when i try to change it by ulimit command i facing this error

# ulimit -a

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1953124
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 8000


# ulimit -d 15728640
sh: ulimit: The specified number is not valid for this command.

How i can increase it to max size.

Thanks
itrc55
Regular Advisor

Re: ulimit Command Promlem

Hi,

# kctune maxdsiz_64bit=15GB
* The automatic 'backup' configuration has been updated.
* The requested changes have been applied to the currently
running configuration.
Tunable Value Expression Changes
maxdsiz_64bit (before) 2147483648 2147483648 Immed
(now) 16106127360 15GB


Thanks
Dennis Handly
Acclaimed Contributor

Re: ulimit Command Promlem

>when I try to change it by ulimit command I facing this error

Forget about ulimit(1). That's not for 64 bit data limits and does no good unless you want to make things smaller.

>How I can increase it to max size?
>maxdsiz_64bit (now) 16106127360 15GB

If you have changed maxdsiz_64bit, you are done. Try running your app. And what is "swapinfo -tam"?