Project

General

Profile

Actions

Bug #1537

closed

host memory usage track in suricata.log

Added by Peter Manev over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:

Description

Using - 2.1dev (rev 7281ae6)
I have the following config in suricata.yaml:

host:
  hash-size: 4096
  prealloc: 1000
  memcap: 16777216

Which results in :

[4660] 2/9/2015 -- 18:02:31 - (host.c:212) <Info> (HostInitConfig) -- allocated 262144 bytes of memory for the host hash... 4096 buckets of size 64
[4660] 2/9/2015 -- 18:02:31 - (host.c:235) <Info> (HostInitConfig) -- preallocated 1000 hosts of size 112
[4660] 2/9/2015 -- 18:02:31 - (host.c:237) <Info> (HostInitConfig) -- host memory usage: 398144 bytes, maximum: 16777216

However it does not add up when looking at it:
hash(4096*64)+prealloc(112*1000) = 390144 not 398144 bytes

Similar if I change the prealloc to 10 000 instead of 1000 -

host:
  hash-size: 4096
  prealloc: 10000
  memcap: 16777216
[4805] 2/9/2015 -- 18:10:35 - (host.c:212) <Info> (HostInitConfig) -- allocated 262144 bytes of memory for the host hash... 4096 buckets of size 64
[4805] 2/9/2015 -- 18:10:35 - (host.c:235) <Info> (HostInitConfig) -- preallocated 10000 hosts of size 112
[4805] 2/9/2015 -- 18:10:35 - (host.c:237) <Info> (HostInitConfig) -- host memory usage: 1622144 bytes, maximum: 16777216

hash(4096*64)+prealloc(112*10000) = 1382144 not 1622144 (240 000 bytes of a diff)

Not sure if there is a mem allocation I a missing or this is actually a bug?

Actions #1

Updated by Peter Manev over 8 years ago

  • Status changed from New to Closed

This is fixed in the latest git/RC.

Actions

Also available in: Atom PDF