NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

Holt59
11113
accept rate: 0%

edited 08 Mar '18, 11:03

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.

(08 Mar '18, 12:20) scai ♦
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×252

question asked: 08 Mar '18, 11:03

question was seen: 866 times

last updated: 08 Mar '18, 12:20

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum