[whatwg] Limit on number of parallel Workers.

I think Ian's decision to add no language to the spec is the correct one. To
be clear, we were never asking for Ian to put a limit in the spec - rather,
given the de facto existence of limits on some platforms, we wanted to
discuss how those platforms should behave to ensure that they were still
compliant with the specification.
Per previous discussions, some implementations have little or no overhead
per worker (e.g. Firefox which uses a static thread pool to service worker
tasks). On those platforms, it makes no sense to allow the user to specify a
maximum number of workers, so having language in the spec saying that UAs
"SHOULD" do so is inappropriate.

This type of UA-specific setting is something best left outside the spec
entirely.

-atw

On Wed, Jul 8, 2009 at 3:41 AM, Eduard Pascual <herenvardo at gmail.com> wrote:

> On Wed, Jul 8, 2009 at 1:59 AM, Ian Hickson<ian at hixie.ch> wrote:
> >
> > I include below, for the record, a set of e-mails on the topic of
> settings
> > limits on Workers to avoid DOS attacks.
> >
> > As with other such topics, the HTML5 spec allows more or less any
> > arbitrary behaviour in the face of hardware limitations. There are a
> > variety of different implementations strategies, and these will vary
> > based on the target hardware. How to handle a million new workers will be
> > different on a system with a million cores and little memory than a
> system
> > with one core but terabytes of memory, or a system with 100 slow cores vs
> > a system with 10 fast cores.
> >
> > I have therefore not added any text to the spec on the matter. Please let
> > me know if you think there should really be something in the spec on
> this.
> >
>
> Shouldn't a per-user setting be the sanest approach for the worker
> limit? For example, it would quite make sense for me to want a low
> limit (let's say 10 or so) workers on my laptop's browser; but have no
> restriction (or a much higher one, like some thousand workers) on my
> workstation.
> Ian's point is key here: what's an appropriate limit for workers
> depends almost entirely on hardware resources (and probably also on
> implementation efficiency and other secondary aspects), and there is a
> *huge* variety of hardware configurations that act as web clients, so
> it's just impossible to hardcode a limit in the spec that works
> properly for more than a minority. At most, I would suggest a note
> like this in the spec "User agents SHOULD provide the user a way to
> limit the ammount of workers running at a time.": emphasis on the
> "SHOULD" rather than a "MUST", and also on the fact that the final
> choice is for users to make. Then it'd be up to each implementor to
> decide on default, out-of-the-box limits for their browser (it would
> make sense, for example, if Chromium had a lower default limit than
> FF, since C's workers are more "expensive").
>
> Just my two cents.
>
> Regards,
> Eduard Pascual
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090708/a41fd924/attachment-0001.htm>

Received on Wednesday, 8 July 2009 10:08:26 UTC