Optimal number of threads in real browser testing

Am writing a program for multithread real browser testing using ruby
1.9.3p327. It has basically many input arrays which just directs browser
what to do.
Each thread will handle one browser.
The question is how to decide optimal number of threads to make the
whole execution using least time.

What are the factors on which it should depend?

So more formally-
if I have n-core k-ghz system, ruby 1.9.3p327, using watir-webdriver,
real browser testing and each site on an average take t microsecond,
then what is the optimal number of threads?
Does it depend on the browser? if yes then how? I am concentrating on
ff, ie, chrome.

Does it depend on OS? I am concentrating on vista and windows-7.

This thread is more about discussion, its always far better to get a
rational/correct answer. but reasons and the process is needed to learn
and help many people.

We should not forget that in browser testing, machine waits for respense
from server, so there is lot of time for processor in that case? if am
not wrong?

One more thing .. I am sure it depends on the bandwidth of the internet.
So include this parameter also.

Its great to arrive at an expression involving above parameters or any
other parameter which I missed out. Isnt it possible? if not then why?

Thanks in advance.

···

--
Posted via http://www.ruby-forum.com/.

···

--
Posted via http://www.ruby-forum.com/.

Without some data to extrapolate from you'll be making wild guesses.
With some data, you can make educated guesses.

···

--
Posted via http://www.ruby-forum.com/.

I have done some test, measures here:

pure calculus :
    http://regisaubarede.posterous.com/threading-and-smp

many disk read (grep -r ):
  http://regisaubarede.posterous.com/threading-and-smp

So with jruby/iron ruby, optimum is one thread by core, for pure
calculus
When many I/O, that depend on system, type of io. anyway, jruby and
ironruby are the best for multi core environment (no giant lock).

for net processing, its seem that event machine + multi process is the
must.

Regards,

···

--
Posted via http://www.ruby-forum.com/.

Joel Pearson wrote in post #1085951:

http://ruby.about.com/od/tasks/f/benchmark.htm

Thats the way by observing code, is there no way to do it using pen and
paper only? I mean theoretically?

···

--
Posted via http://www.ruby-forum.com/.

Regis d'Aubarede wrote in post #1086001:

So with jruby/iron ruby, optimum is one thread by core,
for pure calculus.

When many I/O, that depend on system, type of io. anyway,
jruby and ironruby are the best for multi core
environment (no giant lock).

What is giant lock mean? and what if i use ruby?

for net processing, its seem that event machine + multi
process is the must.

not clear.

···

Regards,

--
Posted via http://www.ruby-forum.com/.