Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate .osrm file #6329

Closed
mjjbell opened this issue Aug 24, 2022 · 7 comments · Fixed by #6354
Closed

Deprecate .osrm file #6329

mjjbell opened this issue Aug 24, 2022 · 7 comments · Fixed by #6354

Comments

@mjjbell
Copy link
Member

mjjbell commented Aug 24, 2022

The .osrm file contains a node-based graph representation of the OSM data, prior to compression and edge-expansion.

It's generated by osrm-extract and only read by osrm-extract. I believe it's a hangover from when the data was too large for RAM, so was first serialised to disk. However the file contents are immediately read back into memory anyway.

Assuming the file had value beyond the extraction phase, there are inconsistencies in which metadata components are serialised.
Traffic signals and barriers are serialised to disk as part of the graph, but other metadata, such as turn lanes, restrictions and manoeuvrer overrides are not. They are only kept in memory long enough for subsequent extraction steps.

Therefore, I propose that we scrap the disk serialise/deserialise step and stop generating this file.

.osrm is one of, if not the largest file generated during processing. Given we generate many other specific files for use in later processing stages, we can stop persisting the .osrm file entirely to save storage space, and if needed serialise its contents to more targeted files.

@mjjbell
Copy link
Member Author

mjjbell commented Aug 24, 2022

The toolchain file overview refers to .osrm as a temporary file. However, there is a dependency on the file in osrm-components.

I'm not sure of the maintenance status of that tool, I've never used it myself. In any case, we could make serialising an optional setting on osrm-extract for debug purposes such as this.

@SiarheiFedartsou
Copy link
Member

Is it about the same? #2055

@SiarheiFedartsou
Copy link
Member

@mjjbell don’t you mind if I’ll try to fix that?

@mjjbell
Copy link
Member Author

mjjbell commented Aug 28, 2022

Yes it sounds similar.

I would suggest holding off until #6153 is applied, as it has related changes.
What is the proposed fix? To make serialising to disk optional?

@SiarheiFedartsou
Copy link
Member

What is the proposed fix? To make serialising to disk optional?

I think so.

@SiarheiFedartsou
Copy link
Member

Started experimenting in #6354

@dooley
Copy link

dooley commented Nov 15, 2023

So how do i get the components.geojson now (5.27.1)?

  • [ok] osrm-extract -p ~/routing/trunk/profile/standard/car.lua germany.osm.pbf
  • [ok] osrm-contract germany
  • [fail] osrm-components germany components.geojson

osrm-components germany small.geojson
terminate called after throwing an instance of 'osrm::util::RuntimeError'
what(): Problem opening file: germany : (possible cause: "No such file or directory") (at include/storage/tar.hpp:38)
Aborted (core dumped)

Edit: found --dump-nbg-graph. But still then the osrm-components called without parameter wrote you call map.osrm, where it should read map.osrm.nbg. Again a small on, beside the hundreds of boost messages (deprecated, ...) when compling. Anyway, this problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants