-
Notifications
You must be signed in to change notification settings - Fork 26
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
Phyghtmap is not forking any jobs when generating contour lines, due to max-nodes-per-tile set to 0 #209
Comments
Hi @alfh, Did I get it right that you are referring to two things:
|
If I remember right, the output lines were looked very limited (lines not round anymore, like drawn with just a few connected points) when not using --max-nodes-per-tile=0 --max-nodes-per-way=0. I tried that for a tile in the alps and it looked very bad. |
thanks for the reply! That makes sense, so I would leave it as-is |
I had only looked at this for performance perspective, I did not check any functional effects of --max-nodes-per-tile=0. So I agree that --max-nodes-per-tile=0 should be kept, but then the --jobs should either be set to 1 or be removed, to not pretend that it is multi threaded. I did not even see any noticable improvements even when using --jobs=12 and having 16 vCPU, it seems like only some small portion of the phyghtmap can take advantage for multi CPU. So in general, I think the performance for the wahoomapscreator can be increased with the minimum code effort by processing most of the steps for one tile in parallel, but I'll give some input on that in the exisintg specific issue about scalability. |
Expected Behavior
Changing number of jobs argument for phyghtmap, should lead to difference in how many subprocesses are created.
Current Behavior
As far as I can see from the code, and when looking at the log output, the forking is not influenced by the arguments.
So I think the jobs argument should either be removed, or set to 1, and also comment that it does not help to try to change it.
I do not understand the phyghtmap well enough, to judge if the max-nodes-per-tile=0 is strictly needed.
Steps to Reproduce the Issue
When the phyghtmap is started, the python code is using this code in osm_maps_functions.py
But the options "jobs" is really disregarded by and "max-nodes-per-tile", this is the relevant code from phyghtmap
and
Context
These comments apply for Linux.
For Windows, phyghtmap does not support any threading at all, since it check for the "fork" support.
Since for example the 133/75 tile takes 110 seconds to generate the contour lines, and the CPU usage indicated that only one core is being used, there are great performance improvement potential when using phyghtmap.
But when I tried running phyghtmap manually from command line, and without the "max-nodes-per-tile=0" and with jobs set to 2 or higher, this also did not seem to have any real effects. The log output seemed to indicate that it was processing only one file at the time.
So it seems like we might have to look at setting things up for paralell executing from wahoomc, by using asyncio, and invoking phyghtmap for different tiles in paralell, but that should be covered in another issue.
Log Output / Stack Trace
The text was updated successfully, but these errors were encountered: