osrm-backend
osrm-backend copied to clipboard
How can I limit the application in docker in the cores used?
With a heavy load, the server freezes tightly, I would like to limit the applications inside the container by the CPU cores consumed
[info] starting up engines, v5.26.0 [info] Threads: 64 [info] IP address: 0.0.0.0 [info] IP port: 5000
Use --threads parameter when running osrm-routed(https://github.com/Project-OSRM/osrm-backend/blob/4e8ee288d98bdf0e9725f11b5392f6276ede8bcb/src/tools/routed.cpp#L114).
I.e. smth like:
docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf --threads 8