Nmap Development mailing list archives

Re: --min-parallelism sets max parallelism too


From: "Kris Katterjohn" <katterjohn () gmail com>
Date: Sun, 2 Sep 2007 09:45:23 -0500

On 9/2/07, David Fifield <david () bamsoftware com> wrote:

All this talk about parallelism made me look deeper into how its works.
And I found something a little surprising. Due to a quirk in how options
are processed, when you specify --min-parallelism without also
specifying --max-parallelism, the maximum parallelism is also set to the
minimum. In other words, the parallelism stays the same for the whole
scan, never dropping below the minimum but never rising above it either.

The relevant code is in NmapOps.cc:

        max_parallelism = 0;

        ...

        /* Prevent performance values from getting out of whack */
        if (min_parallelism > max_parallelism)
                max_parallelism = min_parallelism;

This assignment should only take place if max_parallelism has been
defined, I think. Or is this the intended behavior?

David Fifield


Well, there is also this line above that:

  if (max_parallelism && min_parallelism && (min_parallelism >
max_parallelism)) {
    fatal("--min-parallelism=%i must be less than or equal to
--max-parallelism=%i",min_parallelism,max_parallelism);


So if they are both set, and min > max, then it bails.

But otherwise, max = min because you need to have max >= min and (I guess)
you can't really gauge how much the user wants for a max.

That's what I get from it, but I usually just stick with the timing
templates for changes :)

Thanks,
Kris Katterjohn

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: