Ethereal-dev: Re: [Ethereal-dev] Performance. Ethereal is slow when using large captures.
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Kevin <kem2@xxxxxxx>
Date: Fri, 14 Nov 2003 17:06:17 -0500
Not a programmer, but would be happy to help in anyway.As to testing the speed, I would suggest that you specify the gprof, ps and any other values you wish to capture.
Kevin On Thursday, November 13, 2003, at 09:54 PM, Ronnie Sahlberg wrote:
Ethereal is very slow when working with very large captures containing hundred of thousands of packets.Every operation we do that makes ethereal rescan teh capture file taks along time.I would like to start looking at methods to make ethereal faster, especiallyfor large captures trading a larger memory footprintfor faster refiltering speeds but would like to know if there are othersinterested in helping.(you dont have to be a programmer, someone that knows how to run gprof andread the data would be very very helpful as well) If there is interest maybe we should try to ask Gerald to set up anadditional mailinglist as well : ethereal-speed@xxxxxxxxxxxx but that is aquestion for later depending on whether there is interest. If there is interest in this, I propose we take 0.9.16 as baseline, and measure the execution speed and memory footprint for ethereal for this version to start with.A good example capture might be setting snaplen to 100 and downloading ethereal from the website over and over until the capture file has 100.000packets (10MB).Create three color filters : "ip" "tcp" and "frame.pkt_len>80" (randomfilter strings from the top of my head) Open the UPD and the TCP conversation list. Load the capture into ethereal.then measure the time it takes to refilter the capture as fast as possible10 times using the display filter "tcp.port==80" After the 10th refilter of the trace, measure the memory footprint of ethereal using ps. Repeat this using a gzipped copy of the capture file. This could be the baseline.(the time to perform the test should be a couple of minutes at least so thatwe can see any differences in test implementations easier)After this it would be good if someone did this test and collected gprofdata to see where most of the cpu is spent. I guess but am not sure it is in the actual dissection of the packet. It would be great to have this verified.Everything below this line assumes the theory that the dissection of packetsare taking up a significant part of the time to refilter a packet.Hypothesis: a lot of time is spent redissecting the packets over and overeverytime we refilter the trace. Possible Solution: reduce the number of times we redissect the packets.(We would need a preference option called "Faster refiltering at the expenseof memory footprint". Memory is cheap but CPU power is finite) currently:Everytime we rescan a capture file we loop over every single packet and:dissect the packet completely and build an edt tree (in file.c)prune the edt tree to only contain those fields that are part of any of the filters we use (display filter, color filter, the filter used by taps etc)evaluate each filter one at a time using the now pruned edt tree. discard the edt tree and go to the next packet. possible optimization:When we dissect the packet the first time, keep the full edt tree aroundand never prune it. The loop would then be: Loop over all the packets:For this packet, find the unpruned edt tree (dont dissect the packet atall) apply all filters one at a time on the unpruned edt tree.This would at the expense of keeping the potentially very memory consumingedt tree around eliminate the need to redissect the packet.The memory required by the edt tree could probably be optimized over time. The risk is, how will the time it takes to evaluate a filter be affected by the tree not being pruned? What is the execution time compared to number of fields held in the edt tree ? Ordo(n) or Ordo(n^2) ? Maybe we wouldhave to do major brainsurgery there as well? Maybe it turns out to be unfeasible? Who knows until we have tried.Still, SOME things we do would require a redissect of the packet anyway suchas when clicking on the packet in the packet list but that is not performance critical.Can anyone see any obvious flaws in the reasoning above which would make itunfeasible or the approach irrelevant?Would anyone that knows gprof be interesting is doing the measurements onthe "baseline" as suggested? and keep testing the same sample filefor all further performacne tests we do so we know if we are going in theright direction or not? _______________________________________________ Ethereal-dev mailing list Ethereal-dev@xxxxxxxxxxxx http://www.ethereal.com/mailman/listinfo/ethereal-dev
- References:
- [Ethereal-dev] Performance. Ethereal is slow when using large captures.
- From: Ronnie Sahlberg
- [Ethereal-dev] Performance. Ethereal is slow when using large captures.
- Prev by Date: Re: [Ethereal-dev] Performance. Ethereal is slow when using large captures.
- Next by Date: [Ethereal-dev] Patch for Protocols and Preferences hotkeys
- Previous by thread: Re: [Ethereal-dev] Performance. Ethereal is slow when using largecaptures.
- Next by thread: [Ethereal-dev] rtpdump & CN packets
- Index(es):