Re: threads vs. processes
[email protected] (Mihai Vlad)
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
I haven't done such a test but i can tell you what i've become to consider a best way to run a stress script for example. I made a master program that launches some proceses and monitors them. (It can tell when the kernell kills one of them etc..). Each process runs a number of threads, With this i could easily obtain 500 (processesxthreads ) running without the machine crashing or the kernell messing them up.... Ram Tulasi wrote: >After following a lot of the email discussions, I thought I'd test out >and see the performance benefits of using ithreads. >Yeah, I was apprehensive and kind of expecting the results below.. :) > >I am using perl 5.8.6 on Linux 2.4.18-14 > >Results from a test run that in which each thread/process is simply >looping and doing an 'ls' on the local filesystem. >I used Proc::ProcessTable to gather the system memory statistics. > >With 50 threads: > Total memory used = 365797376 > Percent memory (pctmem) = 24 >With 50 processes: > Total memory usage = 513978368 > Percent memory (pctmem) = 32 > >So, really they are comparable and I'd expect threads to use more >memory as the number increases.. I couldn't really get 100 threads to >run for me successfully yet... > >Anyone else have similar numbers that we could compare with? >-Ram > > -- Mihai Vlad