Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Prioritize old render requests #3721

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Prioritize old render requests #3721

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: BenBE1987[at]gmx.net
[Submitted to the original trac issue database at 5.53pm, Monday, 25th April 2011]

While having a look at the list of open requests I saw that there are some requests that are more than two months old. Having a closer look at those tiles I saw furthermore that most of them weren't all them complex either. This suggests that the queue is basically some heap which is known to not work that well in regards to guaranteeing any deadline for the processing.

Wouldn't it be much better if instead of simply throwing things on a heap if the tile selection algorithm for selecting which tileset to render would take aging of requests into account, gradually increasing their priority?

Some simple way to do this would be something like:

RenderPrio = BasePrio * log_A(1+Age)/log_B(Complexity)

BasePrio in this case is 1 for aged tiles (tiles that are older than e.g. 2 months), 2 for render requests due to changes to the map and 3 for manual requests

Age is the Age of the request in seconds.

Complexity is the tile's complexity as shown by the client.

A is some integer base for weighting the age in the priority, suggested values would be between 2 and 8.

B is some integer base for weighting the complexity in the priority, suggested values would be between 10 and 16.

Higher render priorities should be preferred

@openstreetmap-trac
Copy link
Author

Author: spaetz
[Added to the original trac issue at 8.22am, Tuesday, 26th April 2011]

Hi, there. The render queue is no heap.

In fact, the prioritization used to look somewhat like this as you proposed:
RenderPrio? = BasePrio? * log_A(1+Age)/log_B(Complexity)

(it never took complexity into account though why would a complex tile have a lower priority?)

But we had some locking problems, and I simply adapted a simple query that fetched sorted by priority. You are right that I never got around adding the age component back, I will fix that.

As for the other bugs filed, they are essentially client issues, that I cannot solve on the server side. I hope someone fixes them.

@openstreetmap-trac
Copy link
Author

Author: iandees
[Added to the original trac issue at 8.58pm, Monday, 9th September 2013]

Cleaning aging tickets.

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

No branches or pull requests

1 participant