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 CPU utilization is distributed? #115

Open
srividyacb opened this issue Feb 7, 2019 · 2 comments
Open

How CPU utilization is distributed? #115

srividyacb opened this issue Feb 7, 2019 · 2 comments

Comments

@srividyacb
Copy link

Is there any documentation on how CPU and memory allocation is done for a tile-reduce script?

A tile-reduce script which is running in a 32 CPU core machines uses all the cores to process 400 tiles uses all the cores initially for 4-5 tiles and then only one CPU is allocated till the end.

What might be the issue here? Is this the issue with cached memory or because of too many operation happening inside map.js?

@morganherlocker
Copy link
Contributor

Hey @srividyacb, my guess is that you have a set of tiles that are a bit unbalanced, with a few tiles being significantly larger than the others. One option is to try tiling your data at a higher zoom to spread out the work more evenly across cores. Another thing to consider is whether your map script is in need of optimization, particularly in cases with larger tiles. Tiles that take significantly longer than others despite being only a bit larger are a good sign of either:

  1. a memory leak causing the garbage collector to thrash, or...
  2. an algorithm that is O(n^2). Sometimes an algorithm can only be formulated this way, but usually there is some sort of indexing work that can be done once up front to speed things up (like an R-Tree)

To rule out 1, I would check the task manager while the job is running and see how high the memory utilization climes on the busiest processes.

@srividyacb
Copy link
Author

Thank you so much for responding @morganherlocker .

So just to understand again, one tile is assigned to one CPU core at once and execution time is dependent on the density of the tile. Is that right?

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

No branches or pull requests

2 participants