-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Describe the bug
While doing a migration from Chef to Goiardi, we encountered a significant memory issue during knife upload cookbooks/
(We are running multiple pod with s3&postgresql)
By the look of it there are at least several points which should be looked into
- Usage of Decoder instead of unmarshal (https://ahmet.im/blog/golang-json-decoder-pitfalls/)
- Usage in general of json package for unmarshalling. Right now we are using anonymous object, if we were able to define expected input/output objects, we could use easyjson
- By the first look of it, most of the issues (at least in our case) are happening because on every upload we read and decode every cookbook in our db, it might be better provide a support for caching of some sort (possibly storing a flag which would be altered on every op which alters cookbook state. If (on reading cookbooks) the flag has not changed, then cookbooks would reflect whats in memory.
@ctdk your thoughts about it? Do you know if there are any kind of rfc for request/response objects of chef?
p.s. the dropdown you see in graph is because container is oom killed and restarted.
Also, in our case, rss usage potentially might be caused by https://golang.org/doc/go1.12#runtime
sermilrod
Metadata
Metadata
Assignees
Labels
No labels

