osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

How can I limit the application in docker in the cores used?

Open mvbelik opened this issue 3 years ago • 1 comments

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

mvbelik avatar Aug 01 '22 15:08 mvbelik

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

SiarheiFedartsou avatar Aug 01 '22 19:08 SiarheiFedartsou