0

I have been running the same script in different terminal windows using different arguments. I have accumulated about 40 terminal windows. I am aware of using '&' to run all of these scripts in one window, and also GNU parallel. Though I am open to any suggestions using these commands that I may be missing.

Script:

$ python script.py arg1 arg2

However, I would like to know how to know the limit of processes that could be executed at the same time. I ask this because when I run the 40 terminal windows simultaneously, the script never seems to finish in any of the windows. Although I can run about 20 terminal windows with he script finishing.

EDIT: ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
file size               (blocks, -f) unlimited    
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 709
virtual memory          (kbytes, -v) unlimited
Labrat
  • 105
  • 10
  • What is the output of `ulimit -a` on your system? Add the output to your question. –  Jun 16 '16 at 14:54
  • Okay, it has been edited. – Labrat Jun 16 '16 at 15:05
  • Does your script open any files? Is it possible you are trying to run more than 709 processes? –  Jun 16 '16 at 15:15
  • Yes, the two arguments are 2 files. It also opens 2 files to write to. – Labrat Jun 16 '16 at 15:34
  • So `40 x 4 = 160`. If we include all of the files that are open for other reasons, you might be over that 256 `open files` limit. –  Jun 16 '16 at 15:40
  • Okay, thanks for that. Is there a way to know how many files are currently open or a way to prevent from going over that limit? – Labrat Jun 16 '16 at 15:52
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/114864/discussion-between-david-cullen-and-labrat). –  Jun 16 '16 at 15:59

0 Answers0