How could I limit the number of CPU threads used by MOTIS? #256
-
On my local server, I don't want that MOTIS uses all my CPU resources. How can I limit it to use a given amount of CPU threads? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 32 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer Felix, but it doesn't seem to work for graph
building at least. I tried ./motis --num_threads=24 and got 40 using
latest release.
Le 2022-07-18 15:56, Felix Gündling a écrit :
The --num_threads=4 flag or num_threads=4 INI property of the
config.ini can be set to configure the number of threads.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks Felix for your explanations and for planning to fix this, even if
it's not right now.
Is there a resource friendly way to deal with refreshing GTFS data
everyday (if possible without downtime?) and keeping other data
untouched?
In my situation with French railroad (SNCF) and Paris region data that
I'm willing to test, stops are not changing or very marginally day after
day (like routes, and roads from OSM), but a new dataset is generated
everyday, that changes trip_ids, hence the mapping with GTFS-RT feeds.
Thanks for your help.
Le 2022-07-18 18:30, Felix Gündling a écrit :
That's true. Currently, MOTIS uses several external dependencies (some
written by us like PPR or tiles, some by others like OSRM). Some of
them use their own thread-pool implementation. The MOTIS code (in this
repo) currently does not have control over the number of threads
created in these third-party thread-pools. The number of threads you
can specify via `--num_threads=X" controls the thread pool MOTIS uses
when the server is actually running.
I created an issue for this: #258 [1]
However, currently I don't have the time resources to fix this.
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I would guess this comes from the Protocol Buffers parser and means that the downloaded file was not a valid protobuf file. Not much we can do here. I could not reproduce this message with the GTFS-RT URLs in your
I also got this error with your config. Seems like this was missing; https://stackoverflow.com/a/59225060
Not yet. I commited simple proxy support. However, I don't think it's usable for HTTPS-based GTFS-RT streams. This requires establishing a connection to the GTFS-RT server via the proxy using the |
Beta Was this translation helpful? Give feedback.
-
Nice! That part is working well! Thanks a lot for your reactivity and efficiency! RT feeds are parsed and every problem in them is very well explained now.
About the livemap, it seems that grey doesn't bring a lot of contrast with the tracks/roads color. Maybe a deep blue would be better if it's not used elsewhere (Sorry for pointing towards grey in the first place)?
Would it also be possible to have some way to discard an itinerary once we calculated it? Currently I can't get rid of it, even by reloading the interface.
Then, could you add some possibility to move the map with the mouse instead of using the keyboard?
Would it also be possible for the android app to configure an alternative server to use for custom deployments?
And last but not least, since I got MOTIS working, even without RT data, I have some memory use problems.I don't know if it's linked but when I open the web interface on Firefox on MacOS or on Android (maybe Chrome too?), Memory use rises after some moves on the map (zoom, etc) to use more that the double it uses before, from 8Gb to >16Gb (maybe even more, but my server memory is then full) in my configuration.I got these kind of messages in the server console, before it got killed either by me or the OOM killer:
```
[warn][2022-07-21T20:10:03Z+0000][dispatcher.cc:121] target not found: /gbfs/info
[net::web_server] write: Broken pipe
[net::web_server] write: Broken pipe
[net::web_server] write: Broken pipe
[net::web_server] write: Broken pipe
[net::web_server] write: Bad file descriptor
```
It doesn't seem to happen when I'm browsing the interface with Firefox under Linux (Ubuntu 22.04LTS), but maybe I didn't try enough to get it triggered.
Do you know what could be the problem? Is there some more information I could collect to help fixing this?
Again, thanks a lot for your help.
|
Beta Was this translation helpful? Give feedback.
-
Ok I think I found what is happening.
I started using a pretty big GTFS-RT feed generated for my "internal" use from the SIRI-Lite data provided by the Ile de France transportation authority (IDFM). RT data flushing step now takes about 70/80 seconds (for about 10000 GTFS-RT updates only for this feed) and user web interface seems to be unresponsive until this data is flushed or used (even if I dedicate 3 or 4 threads to MOTIS).
Is there some way to enhance parsing or make MOTIS able to reply even if RT data is processing?
If useful, I'm ready to provide the big GTFS-RT feed privately for tests, but I'm not sure I can share this modified data publicly because of licensing terms.
Thanks for your help.
|
Beta Was this translation helpful? Give feedback.
-
Done a few seconds ago. Thanks!
|
Beta Was this translation helpful? Give feedback.
The
--num_threads=4
flag ornum_threads=4
INI property of theconfig.ini
can be set to configure the number of threads.