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

How to free osrm-datastore's shared memory #947

Closed
clintharris opened this issue Mar 11, 2014 · 2 comments
Closed

How to free osrm-datastore's shared memory #947

clintharris opened this issue Mar 11, 2014 · 2 comments

Comments

@clintharris
Copy link

The process I use for "shutting down" OSRM, including freeing shared memory, is less than elegant:

  1. Pay attention to osrm-datastore's runtime output, noting the # of bytes it loads.
  2. Run icmp -m and look for a segment with the same # of bytes to get a shmid
  3. Then run ipcrm -m {shmid} to free the shared memory...

Is there a better way of doing this?

@DennisOSRM
Copy link
Collaborator

At the time ipcrm is the way to go. We should add this functionality to osrm-datastore.

@DennisOSRM
Copy link
Collaborator

Adding it to osrm-datastore:

$ ./osrm-datastore -h
[info] osrm-datastore [<options>] <configuration>:

Options:
  -v [ --version ]                    Show version
  -h [ --help ]                       Show this help message
  -s [ --springclean ]                Remove all regions in shared memory
  -c [ --config ] arg (="server.ini") Path to a configuration file

Configuration:
  --hsgrdata arg        .hsgr file
  --nodesdata arg       .nodes file
  --edgesdata arg       .edges file
  --geometry arg        .geometry file
  --ramindex arg        .ramIndex file
  --fileindex arg       .fileIndex file
  --namesdata arg       .names file
  --timestamp arg       .timestamp file

usage is easy:

$ ./osrm-datastore --springclean
[info] springleaning: y
[info] spring-cleaning all shared memory regions

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

No branches or pull requests

2 participants