Wireshark-bugs: [Wireshark-bugs] [Bug 5802] Rewrite&cleanup wiretap/file_wrappers
Date: Wed, 6 Apr 2011 10:54:50 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5802

--- Comment #15 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> 2011-04-06 10:54:48 PDT ---
Created an attachment (id=6128)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=6128)
Program to benchmark wiretap i/o

Some benchmarks (programm attached, enjoy :>):
  #1 - read packets from start to end 
  #2 - read packets from end to start (read 15 packets sequential)
  #3 - random seek 

$ stat /tmp/pcap
  File: `/tmp/pcap'
  Size: 81546244        Blocks: 159272     IO Block: 4096   regular file
  (78 MiB)

$ ./capinfos /tmp/pcap
File name:           /tmp/pcap
File type:           Wireshark/tcpdump/... - libpcap
File encapsulation:  IEEE 802.11 plus radiotap WLAN header
Number of packets:   60174
File size:           81546244 bytes
Data size:           80583436 bytes
Data byte rate:      54575.10 bytes/sec
Data bit rate:       436600.77 bits/sec
Average packet size: 1339.17 bytes
Average packet rate: 40.75 packets/sec

Test results:
  fread:
     Test1: 61 ms (packets 60174 data offset: 81546072)
     Test2: 93 ms
     Test3: 18 ms

  fread_unlocked:
     Test1: 60 ms (packets 60174 data offset: 81546072)
     Test2: 92 ms
     Test3: 18 ms

  zlib i/o:
     Test1: 52 ms (packets 60174 data offset: 81546072)
     Test2: 352 ms
     Test3: 45 ms

  new (GZBUFSIZE 8192)
     Test1: 51 ms (packets 60174 data offset: 81546072)
     Test2: 357 ms
     Test3: 46 ms

  new (GZBUFSIZE 4096)
     Test1: 52 ms (packets 60174 data offset: 81546072)
     Test2: 214 ms
     Test3: 27 ms

  new (GZBUFSIZE 2048)
     Test1: 57 ms (packets 60174 data offset: 81546072)
     Test2: 159 ms
     Test3: 17 ms

FILE i/o wins ;)

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.