[whatwg] [WebWorkers] About the delegation example

Hi,

First of all, there is a typo error in this example. The main HTML page
is a copy/paste of the first example ("Worker example: One-core
computation").

My point here is to ask for a new attribute for the navigator object
that could describe the "best" number of workers in a delegation use case.

In the delegation example, the number of workers chosen is an arbitrary
10. But, in a single-core processor, having only one worker will result
in more or less the same running time, because at the end, each worker
runs on the only core. This is just a waist of memory (and maybe time
because of scheduling cost).
On the other hand, on a 16-core processor (which doesn't exist yet, but
is a realistic idea for the next couple of decades), the task could be
executed faster with 16 workers.

I've given the examples with cores, but the problem may be a little
trickier. In the case of weird operating system, we can imagine that
some ressources (some cores) are not available for user-land processes,
so, the number I'm trying to describe is not just a hardware
description. We can imagine this ressource restriction in virtualized
operating systems too.

The current best way to determine the number of worker that yields the
ressouces in the best way is to run a benchmark on an increasing number
of worker and stop it when the performance improvement stops.
I hope you will admit that this way in not acceptable.

Moreover, for a totally other purpose, this attribute could be used to
make statistics on the spread of multicore processors like the
statistics that are already done for operating system or screen
resolution use.

David

Received on Thursday, 5 November 2009 22:32:35 UTC