https://redmine.openinfosecfoundation.org/https://redmine.openinfosecfoundation.org/favicon.ico?17011170022019-02-07T19:06:32ZOpen Information Security FoundationSuricata-Update - Optimization #2803: test phase should use less memoryhttps://redmine.openinfosecfoundation.org/issues/2803?journal_id=108562019-02-07T19:06:32ZJason Ishjason.ish@oisf.net
<ul></ul><p>2 things come to mind to immediately solve this. Set some of the dict's that are storing all the state to None and see if they get garbage collected. Or break the big main() up into smaller functions, which is more likely to garbage collect stuff as they get reference counted to 0 on function return, plus main() could probably benefit some breaking it up a bit.</p> Suricata-Update - Optimization #2803: test phase should use less memoryhttps://redmine.openinfosecfoundation.org/issues/2803?journal_id=108572019-02-07T19:08:34ZVictor Julienvictor@inliniac.net
<ul></ul><p>I should add that I only tested with python2. The way I observed this is simple: htop showed the mem use of suricata-update while the test command (a suricata -T variant) was running. It can probably be simulated by simply having a test script that sleeps for some time.</p> Suricata-Update - Optimization #2803: test phase should use less memoryhttps://redmine.openinfosecfoundation.org/issues/2803?journal_id=108912019-02-13T15:12:51ZJason Ishjason.ish@oisf.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>Target version</strong> changed from <i>1.1.0rc1</i> to <i>1.0.4</i></li></ul><p>Fixed by setting some collection types to None before running the test. <a class="external" href="https://github.com/OISF/suricata-update/commit/5cea9cf4f29fca00ede5c0882f2f9356415f3aba">https://github.com/OISF/suricata-update/commit/5cea9cf4f29fca00ede5c0882f2f9356415f3aba</a></p>
<p>This is probably about the best we can do without some redesign of suricata-update internals.</p>