cancel
Showing results for 
Search instead for 
Did you mean: 

How to use ULIMIT Command

SOLVED
Go to solution
sysad_boy
Frequent Advisor

How to use ULIMIT Command

Hi guys,

I created a user X for my server but there is a requirement for ulimit values.

How do I edit these ulimit values for a particular user?

Here are the requried values for user X:

1. datasize: 4gb
2. stacksize: 400mb
3. core dump size: 4gb
4. descriptor: 2048
5. memory size: unlimited

Thanks and in advance.





7 REPLIES
Dennis Handly
Acclaimed Contributor

Re: How to use ULIMIT Command

1) is controlled by maxdsiz and maxdsiz_64 bit.
2) is controlled by maxssiz and maxssiz_64bit.
4) is controlled by maxfiles and maxfiles_lim.
3) can just be made bigger using ulimit:
ulimit -c $((4194303 * 2))
5) is typically unlimited.

A user will not be able to use 4 Gb for 1) unless he uses 64 bit or jumps through hoops.

If you set maxssiz to 400 Mb, you will take away 400 Mb from maxdsiz for ordinary programs. You can set maxssiz_64bit to 400 Mb without problems.
Steven Schweda
Honored Contributor

Re: How to use ULIMIT Command

Can you do what you want with one or more
ulimit commands in the user's shell start-up
file (~/.profile, ~/.cshrc, ...)?
sysad_boy
Frequent Advisor

Re: How to use ULIMIT Command

here is my current maxdsiz and maxdsiz_64bit values from kcweb:


maxdsiz 1073741824 1073741824 yes
maxdsiz_64bit 4294967296 4294967296 yes


How is this related to the datasize value that I want which is 4gig?
Dennis Handly
Acclaimed Contributor

Re: How to use ULIMIT Command

>maxdsiz 1073741824
>maxdsiz_64bit 4294967296
>How is this related to the datasize value that I want which is 4gig?

This says the maximum datasize for a 32 bit app is 1 Gb. For a 64 bit app, it is 4 Gb.
sysad_boy
Frequent Advisor

Re: How to use ULIMIT Command

by the way here is my ulimit -a output from the server:

root:/>ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 98252
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 2048

Please help me to change the value for "data" to 4194303 instead of the current value 1048576.


Thanks in advance
Dennis Handly
Acclaimed Contributor
Solution

Re: How to use ULIMIT Command

>help me to change the value for "data" to 4194303 instead of the current value 1048576.

As I said, you change maxdsiz to 4294967296. But it will not help you for a 32 bit application. You will have to relink it with -N and use chatr to get more.

If you already have a 64 bit application, you should ignore ulimit.
sysad_boy
Frequent Advisor

Re: How to use ULIMIT Command

Thanks for all the replies.

I was able to modify my ulimit values already.