I would like to control how much CPUs osmosis can use?
My typicaly run looks like:
bin/osmosis --rb inputs/france.pbf --lp \
--tf reject-relations --lp \
--tf accept-ways highway=motorway,trunk,primary,secondary \ # maybe more...
natural=coastline junction=roundabout --lp \
--used-node --lp \
--osm2graph file=france.mapgr id=FR name=France
The last task (osm2graph
) is single-threaded but when I run this on a 8-cores machine, I get CPU usage above 100%.
I plan on running osmosis
on a shared platform, so I need to either control its CPU usage, or know its maximum CPU usage so that I can reserve enough without impacting other users.
Is there a way to tell osmosis not to use more than X CPUs/Threads? Or to know how much osmosis is going to use?
asked
08 Mar '18, 11:03
Holt59
11●1●1●3
accept rate:
0%
You can use the tool
cpulimit
to limit the CPU usage of arbitrary processes. A more advanced way is to use cgroups if your kernel supports them.