Re: need help making shell script use two CPUs/cores
Stan Hoeppner <stan@hardwarefreak.com> writes:
>
> Depending on the size of the photos one is converting, if they're relatively
> small like my 8.3MP 1.8MB jpegs, I'd think something like a dual core Phenom II
> X2 w/ 6MB L3 cache and 21.4 GB/s memory b/w would likely continue to scale with
> reduced overall script run time up to 4 parallel convert processes, maybe more,
> due to the "excess" of L3 cache and the 10.7 GB/s available to each core.
>
> Conversely, I'd think that a quad core Athlon II X4 with no L3 cache and only
> 512KB L2 cache per core, with each core receiving effectively only 5.3 GB/s of
> b/w, would not scale effectively to core_count*2 parallel processes as the
> Phenom II X2 would. In fact, due to 4 cores with little cache sharing the same
> 21.4 GB/s of memory b/w, the quad core Athlon II would probably start seeing a
> decline in reduced run time going from 2 processes to 4 as twice as many cores
> compete for memory access, and tailing off dramatically as the process count is
> increased to 5 and up.
>
> Just a guess. Anyone have such systems to test with? :)
I have an Athlon II X4 620 (2.6 GHz), so I ran your test. It is
somewhat different since I am currently running FreeBSD and didn't want
to reboot to get back into debian, and I have GraphicsMagick instead of
ImageMagick, but that shouldn't change the basic results. The results
were that the time decreased up to 4 processes, but remained unchanged
after that.
Processors Time (seconds)
P1 66
P2 36
P3 25
P4 20
P5 20
P6 20
P7 20
P8 20
I am sure the time would have increased if the system had run out of
memory and had to start swapping. The system is not completely idle
since I am running a KDE 4.4.5 desktop and VirtualBox with two guest
OSs (Debian and NetBSD). I suspect it would have closer to linear
scaling if the system had been completely idle.
--
Carl Johnson carlj@peak.org
Reply to: