This may be a priority issue. The webserver serving the WebUI is lower priority for the host OS than the minecraft server jars, and thus handed less resources.
You could also try the tips in this link : https://scoutapm.com/blog/slow_server_flow_chart