I have a python script that has a high runtime (4 days when tested a single script on single virtual-core machine) which works on some list of files based on its input arguments that we provide.
The list of arguments that I wanted to test is very long and running each of them sequentially is not feasible due to the high cost of the infrastructure.
So I tried running the script independently with different arguments on my 12 core machine, e.g.
nohup python script.py 1 &
nohup python script.py 2 &
and such 8 more times.. thinking that each process will be allocated to each core independently and 2 core will be in standby, as there is no overlap in the files on which the scripts would be working, any race condition or deadlock wouldn't occur as the argument that we are passing to all the scripts is different, hence no problem with GIL.
What I have observed is that the individual python scripts are not running at similar pace or following the previously noted timeline, all the ten distinct processes should finish within 4 days but its been like 14 days but only some threads have completed and that too in just last 1-2 days. Rest of the processes are lagging behind which I could see from the log file which is generated.
Can someone please help me understand this behaviour for python??