Nmap Development mailing list archives

Re: Tudor's Status Report - #13 of 17


From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 26 Jul 2016 08:41:11 -0500

Tudor,

I have some questions regarding these performance improvements.

- Removed some unnecessary calls to target_needs_new_hostgroup() in
nmap.cc. This one was really a performance killer and I made so that for
hostgroups smaller than PING_GROUP_SZ (currently 4096) it doesn't get
called at all.

Are we sure this can be taken out? I see two sides to this: first, the call
is important because if a target gets into the wrong hostgroup, it could
result in sending packets out the wrong interface or with the wrong source
address, etc. The other side of it is that this sorting should have already
been done in the host discovery ("ping scanning") phase by the function of
the same name in targets.cc. I guess the code might be easier to understand
directly, but could you explain a bit more why this improvement is
possible?

Performance gains are visible for really high packet rates.

For something like: ./nmap  54.239.156.68/16 -sS -Pn -p 80 -T5 -n --open
--min-rate 130000 --min-hostgroup 16384

Without these optimizations the scan took about 9.6 seconds, with these
optimizations it takes about 8.5 seconds.


Are you also checking smaller scans (CIDR /24 is typical) and normal packet
rates to be sure that we're not regressing in more typical cases?


Thanks for your hard work!
Dan
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: