[Gllug] OT: Tomcat & Apache mapping problem
Rich Walker
rw at shadow.org.uk
Thu Mar 24 16:25:59 UTC 2005
Joel Bernstein <joel at fysh.org> writes:
> On Thu, Mar 24, 2005 at 03:46:12PM +0000, Rich Walker wrote:
>> The -exec option to find is for use in emergencies only. Normally, you
>> want find ... | xargs ... : which will only start 3 processes, rather
>> than 1 per file...
>
> I still don't understand why this happens. Surely they should be
> executed sequentially?
They might be, but executing a lot of processes sequentially can bring a
(smaller) machine to a halt.
rw at zeus:/usr$ cd /etc
rw at zeus:/etc$ time find . -type f -exec ls "{}" ";" > /dev/null
real 0m32.323s
user 0m8.490s
sys 0m17.160s
rw at zeus:/etc$ time find . -type f -exec ls "{}" ";" > /dev/null
real 0m30.998s
user 0m8.270s
sys 0m19.130s
rw at zeus:/etc$ time find . -type f | xargs ls > /dev/null
real 0m0.567s
user 0m0.230s
sys 0m0.320s
rw at zeus:/etc$ time find . -type f | xargs ls > /dev/null
real 0m0.638s
user 0m0.290s
sys 0m0.300s
rw at zeus:/etc$
>> (yes, I have brought my machine to a grinding halt with the use of
>> find...)
>
> As have I. And I'm still convinced that this is very odd behaviour.
I guess it's "process spawn overhead". A bit like frogspawn, in that it
mysteriously appears and fills the pond...
:->
cheers, Rich.
>
> /joel
> --
> Gllug mailing list - Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
--
rich walker | Shadow Robot Company | rw at shadow.org.uk
technical director 251 Liverpool Road |
need a Hand? London N1 1LX | +UK 20 7700 2487
www.shadow.org.uk/products/newhand.shtml
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list