Go binary runs slow in docker container

Hi,

I wrote a program which splits up logs via grok and sends them directly into elasticsearch.
If I run it on any normal Linux machine, it’s working like a charme. As soon as I try to run it in a docker container it is slow as hell.

Any idea how to check what is causing this behavior?

If anyone is interested in the code, it is on github:
Github

How did you run the docker container?

If I’m right you’re using file access and if you’re doing a lot of file operations within a mounted directory it could slow down due to the fs-implementation you’re using in you docker daemon.
If you’re testing the docker container in a MacOS environment, it could get even slower because of the filesystem implementation that’s used.

Hi,

via the Dockerfile. I just copy it on the machine and run it there.
I tried to do the same with a pythonscript and that works like a charme.

Also because Docker runs in a hidden VM, not natively. If I remember correctly, you (@buddyspencer) can tweak this VM, allow more CPU’s and RAM.

Thanks for the reply.
I know that, the problem is that it didn’t helped.

I could send up to 1 million log lines per hour baremetal, but with docker barely 50…