Operating System - HP-UX
1823064 Members
3201 Online
109645 Solutions
New Discussion юеВ

ulimit for a particular user

 
Santanu Bhadra
Advisor

ulimit for a particular user

All:

On one of my servers, I need to set the ulimit
value to "unlimited" for the "oracle" user whose current ulimit is 4194303.

The user uses k shell; There is no .kshrc or .login file in its home directory and no entry for ulimit in .profile. There is no ulimit entry in /etc/profile in that server.
I don't know where from that 4194303 figure is coming!

Please help. Thanks in advance!

Regards,
Santanu
Work hard and be realistically optimistic.
7 REPLIES 7
Craig Rants
Honored Contributor

Re: ulimit for a particular user

This thread may help.

HH,
C

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1f198ffa98a2d5118ff10090279cd0f9,00.html
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Alan Casey
Trusted Contributor

Re: ulimit for a particular user

Check this out:

PROBLEM
On an HP-UX 11.0 system, the "largefiles" feature has been set,
but, fbackup(1M) returns the following error message:

file too large

Also, the following error message is output when attempting to
cat(1) to a file greater than 2Gb:

cannot write to output: file too large

How can this problem be resolved?


CONFIGURATION
Operating System - HP-UX
Version - 11.0
Subsystem - Sys Adm

RESOLUTION
Per the fsadm(1M) command, the "largefiles" option was already
set. It is also necessary to set ulimit() as follows:

1. The fsadm(1M) command indicates that the "largefiles"
option has already been set:

# fsadm -F vxfs /dev/vgXX/rlvolXX

2. The "ulimit -a" command indicates that file (blocks)
are set to the default:

# ulimit -a
...
file (blocks) 4194303
...

NOTE: It is necessary to be in the posix shell to
reset with the ulimit() command. (See the
man page for sh-posix(1) for more information
about the ulimit command and its options.)

Default filesize: 512byte * 4194303 = 2GB limit

3. Set hard limit to "unlimited":

# ulimit -Hf unlimited

4. Set soft limit to "unlimited":

# ulimit -Sf unlimited

5. Check to make sure file (blocks) are unlimited:

# ulimit -a

6. Make necessary changes in /etc/profile, if needed,
in order to set file (blocks) permanently.


Uday_S_Ankolekar
Honored Contributor

Re: ulimit for a particular user

Hi,

From the doc # A5035411

ulimit -s xxxxx where xxxxx is the number of kbytes to use cannot
exceed the system kernel parameter maxssiz. So if the ulimit is at
the value of maxssiz, then maxssiz will need to be increased. Note
that this requires a new kernel to be built and a reboot.

For example:

1. ulimit -a

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 2015464
stack(kbytes) 81584
memory(kbytes) unlimited
coredump(blocks) 4290772993
nofiles(descriptors) 2048

2. echo maxssiz/D | adb /stand/vmunix /dev/kmem
maxssiz:
maxssiz: 20396

3. echo "4 * 20396" | bc
81584



Goodluck,
-USA..
Good Luck..
Sanjay_6
Honored Contributor

Re: ulimit for a particular user

Hi,

I think you just have to add "ulimit unlimited" in the profile for that user.

Hope this helps.

Regds
Santanu Bhadra
Advisor

Re: ulimit for a particular user

Thanks to all for prompt reply; But my problem is still not solved.

Alan, your information is pretty good. The oracle user(NIS user) can set ulimit to unlimited when he goes to POSIX shell. But as soon as he comes out from the POSIX to the k shell(his default shell which he wants), the ulimit is back to 4194303.

Any idea how can I freeze the same to unlimited while he continues to use k shell?

Thanks,
Santanu
Work hard and be realistically optimistic.
Uday_S_Ankolekar
Honored Contributor

Re: ulimit for a particular user

Steve Miller_4
Occasional Advisor

Re: ulimit for a particular user

I don't know if this is going to paste very well from the Metalink site, but here it is. Basically, 4194303 is the default for ksh. You shouldn't need to go any higher. If you're having a problem w/ file sizes, make sure the 'osh' code in oraenv isn't running. Otherwise, the setting the oracle account to use /bin/sh is the only way to get 'unlimited' in response. Here's the metalink doc:

Steve

Summary File Limits for Oracle on HP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

HPUX Unix Limits
~~~~~~~~~~~~~~~~~
Max file system size:
<= HP-UX 10.10 4Gb
>= HP-UX 10.20 128Gb
>= HP-UX 11.00 1Tb

Max OS file size:
<= HP-UX 10.10 2Gb
>= HP-UX 10.20 128Gb
>= HP-UX 11.00 1Tb

Ulimit for filesize:
Shell Query/Set Defaulted In
----- --------- ------------
ksh / sh ulimit /etc/profile
csh limit [-h] filesize /etc/csh.login

The 'largefiles' option is required to support large files on a file system.
The following example shows how to convert a no-large-files filesystem to a
large-files filesystem:

/usr/sbin/fsadm -F vxfs -o largefiles /oracle
or
/usr/sbin/fsadm -F vxfs -o largefiles {special device file}


Oracle Generic Limits
~~~~~~~~~~~~~~~~~~~~~
See [NOTE:62427.1] for generic 2Gb information.
IMPORTANT: There is a generic limit on the maximum Oracle datafile
size of 4million Oracle data blocks. The exact limit is
4194303 * DB_BLOCK_SIZE. Some Oracle operations may try
to exceed this as alerted in [NOTE:112011.1].
Hence if the DB_BLOCK_SIZE=2048 no datafile can be 8Gb
or larger.

Oracle on HPUX Limits
~~~~~~~~~~~~~~~~~~~~~~
If you have problems with files >2GB see the following matrix:
Limits apply to HPUX 10.20 and 11.0 except where noted otherwise.

Max Datafile Size
File Raw Async Export/ SQL*Loader
Release System Device I/O Import** (see **)
===========================================================================
8.1.7.x 64Gb 64Gb raw only >2Gb >2Gb
8.1.6.x 64Gb 64Gb raw only >2Gb >2Gb
8.0.6.x 64Gb 64Gb raw only See*1 See*2
8.0.5.x 64Gb 64Gb raw only See*1 <2Gb
8.0.4.x 64Gb 64Gb raw only SIL HPUX10.20 > 2Gb
HPUX-11 <2Gb
8.0.3.x <2Gb <2Gb raw only 2Gb 2Gb
7.3.4.x 64Gb 64Gb raw only SIL 2Gb
>=7.3.3.4.1 64Gb 64Gb raw only SIL 2Gb
7.3.2.3 <2Gb <2Gb raw only 2Gb 2Gb
7.1.6 <2Gb <2Gb raw only 2Gb 2Gb


SIL = System Imposed Limit
Always test on the actual system to ensure large files can be
read / written.

*1 = HPUX 10.20 requires a patch to create >2Gb export files:
8.0.5.0 to 8.0.5.2 inclusive - Get the patch for Bug:872947
8.0.6.0 to 8.0.6.1 inclusive - Get the patch for Bug:1330994
HPUX 11 can export >2Gb on these RDBMS releases.

*2 = HPUX 10.20 requires a patch for > 2Gb SQL Loader files:
8.0.6 - Get the patch for Bug:1344224
HPUX 11 can SQLLoader can read >2Gb files as standard.

** Exp/Imp/Loader
The above matrix indicates the maximum file size
which can be directly handled by exp/imp/loader.
However, it is possible to read/write files >2Gb
using the OS commands summarised in [NOTE:30528.1]
.

Technology is only as good as those that know how to use it.