gnzsnz / ib-gateway-docker

Docker image with IB Gateway/TWS and IBC
https://github.com/users/gnzsnz/packages/container/package/ib-gateway
MIT License
202 stars 41 forks source link

High CPU-Usage on TWS Desktop #129

Closed handelsmeisterei closed 3 weeks ago

handelsmeisterei commented 2 months ago

tws-desktop (I am on 10.28) has a very high CPU-Usage. Docker stats reports about 150% on my cloud machine (both paper and live are running). When I analyse the processes running (htop) I see several instances of /tmp/JxBrowser/7.29/chromium ... which are responsible for the high CPU load.

Are they even needed for TWS Desktop? Only case I could imagine is, when the user wants to get Contract details and then the browser opens. In my opinion this feature is not worth the performance usage. Is it possible to start TWS without the browser?

gnzsnz commented 2 months ago

i'm using 10.19 (stable) for the same reason, AFAIK those chromium instances are launched by TWS. Stable is using the same chromium instances, so not sure if it's chromium to blame. I have noticed that stable cpu consumption is significantly lower.

i don't know any way to controll chromium, if you find something please let me know.

I think that the reason might be the "advanced charts", but it's hard to tell.

if there is anything that can be done on the image I'm happy to give it a look, but i'm afraid that is a problem with TWS itself.

handelsmeisterei commented 2 months ago

I thought that perhaps chromium could simply be not installed in the dockerfile. But upon inspection, I realised that it will not be installed in the Dockerfile and will be started from within the TWS installation?! If so, I have no idea how this can be avoided (and not doing some hack that always kills all chromium instances)