Meaning of ulimit Hard (-H) and Soft (-S) Meaning of ulimit Hard (-H) and Soft (-S) shell shell

Meaning of ulimit Hard (-H) and Soft (-S)


The hard limits are usually intended to be set by the system administrator to the largest value they would be comfortable with a handful of users using.

The soft limits are usually set by the system administrator to the values they'd like everyone to use most of the time. (Consider soft_limit * number_of_users == almost all of the resource available. Leave enough for root to clean up whatever needs to be done, and the users who know how to fiddle with the hard limits to push the boundaries a bit. Sites requiring absolute stability will give hard limits very close to the soft limits.)

If this is the first time you care, I'd just set the soft limits. That gives you the chance to raise or remove them completely in the same session without requiring you to kill that terminal and all its children.

I believe the core size limit is in bytes, so both 1024 and 10240 are way too small for all but the silliest programs. I'd start with $(( 100 * 1024 * 1024 )) for most programs just out of lazyness, but if I knew the program was huge (Firefox) I'd go for much larger still.