Skip to content

Is shared memory usefull in docker container ? #5134

@grib0

Description

@grib0

Hi,

I followed this wiki page for shared memory configuration

I made the configuration in the server files

  • /etc/sysctl.conf
  • /etc/security/limits.conf

I ran docker container using the following parameter :

docker run --restart=always --ulimit memlock=68719476736:68719476736 --name osrm-backend -d -p 5000:5000 -v /opt/osrm:/data osrm/osrm-backend:v5.18.0 sh -c "osrm-datastore /data/france-latest.osrm && osrm-routed --shared-memory=yes --algorithm mld"

The startup output is :

[info] Data layout has a size of 1894 bytes
[info] Allocating shared memory of 1096107224 bytes
[info] Data layout has a size of 1661 bytes
[info] Allocating shared memory of 2630081913 bytes
[info] All data loaded. Notify all client about new data in:
[info] /static  0
[info] /updatable       1
[info] All clients switched.
[info] starting up engines, v5.18.0
[info] Loading from shared memory
[info] Threads: 1
[info] IP address: 0.0.0.0
[info] IP port: 5000
[info] http 1.1 compression handled by zlib version 1.2.11
[info] Listening on: 0.0.0.0:5000
[info] running and waiting for requests

Why data layout has a only size of 1894 bytes and 1661 bytes ?

Also I ran performance test with or without shared-memory and the results are the same.
So my question is, does the shared memory parameter increase performance and is it compatible with docker container of OSRM or it only applies to standalone start up ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions