Hi guys,
I really need a favour here.
Currently I have 4 CPUs in my server,
I need to load the 144 data, if I load the data sequencially. It takes about 2.5 hours which is not good.
So I need to load the data 3 data at a time assign to each CPU,
Here's roughly my script atm :
what I want is roughly like this
And I need that 3 loading working independently, so whenever loading finish it doesnt have to wait for other to finish but continue loading the next one.
Can you guys shed some light here ?
Any input will be much appreciated.
I really need a favour here.
Currently I have 4 CPUs in my server,
I need to load the 144 data, if I load the data sequencially. It takes about 2.5 hours which is not good.
So I need to load the data 3 data at a time assign to each CPU,
Here's roughly my script atm :
Code:
for file in `ls`
do
[load command] $file > log$file
done
what I want is roughly like this
Code:
for file in `ls`
do
[load command] $file > log$file & [load command] $file > log$file & [load command] $file > log$file
done
And I need that 3 loading working independently, so whenever loading finish it doesnt have to wait for other to finish but continue loading the next one.
Can you guys shed some light here ?
Any input will be much appreciated.