When a segment partially fit in streaming depth, the stream depth reached flag is not set resulting in a continuous inspection of the rest of the session. The consequence is that suricata is inspecting the complete flow instead of stopping inspection at the stream depth limit in a non neglectable number of flows.
Using a yaml that has pcap log enable and that honor stream depth for capture:
--- suricata.yaml 2016-09-25 16:26:56.024983383 +0200
+++ suricata-logpcap.yaml 2016-09-25 16:17:27.234726515 +0200
@@ -330,7 +330,7 @@
# - encrypted streams after the key exchange
#
- pcap-log:
- enabled: no
+ enabled: yes
filename: log.pcap
# File size limit. Can be specified in kb, mb, gb. Just a number
@@ -343,7 +343,7 @@
mode: normal # normal, multi or sguil.
#sguil-base-dir: /nsm_data/
#ts-format: usec # sec or usec second format (default) is filename.sec usec is filename.sec.usec
- use-stream-depth: no #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
+ use-stream-depth: yes #If set to "yes" packets seen after reaching stream inspection depth are ignored. "no" logs all packets
honor-pass-rules: no # If set to "yes", flows in which a pass rule matched will stopped being logged.
and running it on the attached file ipperf.pcap via