Re: ulimit Command Promlem (1736 Views)
Reply
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 1 of 13 (1,760 Views)
Accepted Solution

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
Honored Contributor
Bill Hassell
Posts: 14,210
Registered: ‎05-29-2000
Message 2 of 13 (1,760 Views)

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).
Acclaimed Contributor
Dennis Handly
Posts: 25,198
Registered: ‎03-06-2006
Message 3 of 13 (1,760 Views)

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.)
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 4 of 13 (1,760 Views)

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
Acclaimed Contributor
Dennis Handly
Posts: 25,198
Registered: ‎03-06-2006
Message 5 of 13 (1,760 Views)

Re: ulimit Command Promlem

>The DBA wants to increase maxdsiz to 15 GB

kctune maxdsiz_64bit=15GB
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 6 of 13 (1,760 Views)

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
Acclaimed Contributor
Dennis Handly
Posts: 25,198
Registered: ‎03-06-2006
Message 7 of 13 (1,760 Views)

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?
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 8 of 13 (1,760 Views)

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
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 9 of 13 (1,760 Views)

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
Acclaimed Contributor
Dennis Handly
Posts: 25,198
Registered: ‎03-06-2006
Message 10 of 13 (1,760 Views)

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"?
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 11 of 13 (1,736 Views)

Re: ulimit Command Promlem

Hi,

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 546 15838 3% 0 - 1 /dev/vg00/lvol2
reserve - 15450 -15450
memory 31068 11929 19139 38%
total 47452 27925 19527 59% - 0 -

Thanks
Regular Advisor
itrc55
Posts: 195
Registered: ‎04-10-2010
Message 12 of 13 (1,736 Views)

Re: ulimit Command Promlem

Hi,

> If you have changed maxdsiz_64bit, you are done. Try running your app <

I understand from your post I don't need to use any command to give dsadm user any max limitation. and the application its detect the 15GB.
I asking that because the application it's running by dsadm user.

"Maybe considered silly question but that because I don't have experience in this field."

Thanks
Acclaimed Contributor
Dennis Handly
Posts: 25,198
Registered: ‎03-06-2006
Message 13 of 13 (1,736 Views)

Re: ulimit Command Promlem

>total 47452 27925 19527 59%

You have 19Gb free, enough to run that application.

>I don't need to use any command to give dsadm user any max limitation. and the application its detect the 15GB.

Yes, just run the application.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.