Questions tagged [ulimit]

ulimit gets or sets the upper limit for resources available to the current shell.

356 questions
5
votes
3 answers

Linux per-process resource limits - a deep Red Hat Mystery

I have my own multithreaded C program which scales in speed smoothly with the number of CPU cores.. I can run it with 1, 2, 3, etc threads and get linear speedup.. up to about 5.5x speed on a 6-core CPU on a Ubuntu Linux box. I had an opportunity to…
SPWorley
  • 11,550
  • 9
  • 43
  • 63
5
votes
2 answers

Is there a maximum number of connections for Unix domain sockets?

For TCP/IP connections there is a maximum of 64k connections between two hosts if there's a single destination port (source: What is the theoretical maximum number of open TCP connections that a modern Linux box can have). Is there a connection…
BvdBijl
  • 607
  • 6
  • 16
5
votes
1 answer

How to change limit open file of root user , on Centos 6.4 x64

I tried several way to change open file limit from URL http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/ which I have changed limit.conf and /etc/sysctl.conf it work with other user , but limit open file of root doesn't…
Denny
  • 449
  • 4
  • 17
5
votes
5 answers

Configure ulimit using Puppet

I am wondering how to run the ulimit command using Puppets exec type. The problem with ulimit seems to be that it isn't a binary so it has to be called using /bin/bash in front of it. I am trying to change the core file size to unlimited. I have…
Alan Smith
  • 1,069
  • 4
  • 19
  • 23
4
votes
3 answers

Can I set ulimit from node.js?

I'd like to restrict child processes from writing too much data or taking up too much cpu time (infinite loop). In C, I'd call setrlimit(2) to do that. Is there something like this in node.js?
topskip
  • 16,207
  • 15
  • 67
  • 99
4
votes
1 answer

ulimit first call ok second call fail, why?

On macosx 10.7, using bash The first call to ulimit -n succeeds, while the second fails. a:$ ulimit -n 2560 a:$ ulimit -n 5000 a:$ ulimit -n 5000 a:$ ulimit -n 6000 bash: ulimit: open files: cannot modify limit: Operation not permitted however if…
user379217
  • 81
  • 4
4
votes
1 answer

Exact limit to avoid "Argument list too long "

I know that there are some tricks to avoid the shell's limit, which leads to "argument list too long", but I want to understand why the limit hits in my case (even though it should not). As far as I know the limit of chars in an argument for a…
Jannek S.
  • 365
  • 3
  • 16
4
votes
2 answers

How to limit available memory to make `malloc()` fail?

I'd like to make malloc() fail by limiting the memory available. $ ulimit -v 1000 $ ./main.exe 10000000 0x102bfb000 But even with ulimit, the following program still finishes correctly. Does anybody know how to make malloc() fail? Thanks. #include…
user1424739
  • 11,937
  • 17
  • 63
  • 152
4
votes
3 answers

MongoDB: soft rlimits too low. rlimits set to 27774 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number of files

I have an Ubuntu server which is running on 14.04.05 LTS. There are several applications that is ugins mongodb installed also on this server. MongoDB version is 3.4.2 I'm trying to increase max process ulimit of mongodb process. I first put these…
hardc0der
  • 449
  • 2
  • 7
  • 13
4
votes
1 answer

what is nproc and nofile in ulimits?

I would like to know what nofile and nproc in ulimits is for, preferably with examples. Specifically, what is their role in database?
yogesh.j
  • 51
  • 1
  • 4
4
votes
1 answer

Linux: how to change maximum number of files a process can open?

I have to execute a process on a cluster of machines. Size of cluster is of order 100. So I cannot execute processes manually, I have to execute them by script(which uses ssh, currently I am using python-paramiko for this). Number of tcp sockets…
PHcoDer
  • 1,166
  • 10
  • 23
4
votes
1 answer

How to setting Core file size in Docker container?

I want to set core file size to unlimited in a Docker container. I tried changing limits.conf in container. Dockerfile RUN sed -i.bak '/\# End of file/ i\\* soft core unlimited' /etc/security/limits.conf RUN sed -i.bak '/\# End of file/ i\\* hard…
leeyc
  • 385
  • 2
  • 5
  • 13
4
votes
4 answers

Supervisor open file limit won't change when using Chef

I am modifying /etc/security/limits.conf on the machine, and then installing Supervisor in a Chef recipe. After the recipe run finishes, if I run cat /proc//limits I see: Limit Soft Limit Hard Limit …
Brad
  • 334
  • 5
  • 14
4
votes
1 answer

Causing malloc() to return NULL on CentOS

I'm about to teach an introductory computer science course in C and I'd like to demonstrate to students why they should check whether malloc() returned a NULL. My plan was to use ulimit to restrict the amount of available memory such that I could…
Jason Foster
  • 81
  • 1
  • 2
4
votes
3 answers

Debian squeeze and setting ulimit

All I want to permanently set the core file size to unlimited. Reading about it, the suggestion is to modify the /etc/security/limits.conf. I have done so with the following line: soft core 10000 root hard core …
reza
  • 5,972
  • 15
  • 84
  • 126