Nmap Development mailing list archives

Zenmap memory use progress


From: David Fifield <david () bamsoftware com>
Date: Tue, 7 Sep 2010 18:47:47 -0600

For the past few days I've been working to reduce Zenmap's memory use.
Fyodor wrote:

  Note: Fyodor has a 50MB scan log file named ms-vscan.xml which
  demonstrates this problem.  When trying to load the file, Zenmap
  grows to 1150MB of RAM, pegs the CPU usage at 100% for many
  minutes or maybe hours (I forgot about it, but woke up the next day
  to find that it had started, was then using 2.4GB of RAM.  The
  hosts/services functionality seemed to work, although it would take
  a minute or so to switch from say "ftp" port to view "ssh" ports.

I've only made a little progress on reducing the memory so far. But I
have made a number of changes that greatly improve the slowness of
loading the file. There were several loops of O(n^2) complexity or worse
that I've improved, doing things like using a hash table as a temporary
cache instead of doing a linear search through all hosts. Now the file
loading, while not exactly fast, is markedly better. Loading
ms-vscan.xml takes minutes instead of hours. These changes are already
committed to the trunk.

I'm able to load the file in 1.5 GB of RAM. That's more of a reduction
than I expected from the few memory-related changes I've made. Fyodor,
will you test again with Zenmap trunk and see how much memory it's
using?

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


Current thread: