From b0ae60f69b8b7c2bc499d3a391cb3914b5bf14ee Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Sun, 8 Jan 2017 22:36:54 +0300 Subject: [PATCH 1/4] Update render queue limits Adjust render queue depth so that a rendering server dirty queue length is shifted from several minutes (1000 / 7 ~= 142 s ~= 2.3 minutes) to a whole day. --- includes/render_config.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/render_config.h b/includes/render_config.h index 997348f0..0858710e 100644 --- a/includes/render_config.h +++ b/includes/render_config.h @@ -70,17 +70,18 @@ //Legacy - not needed on new installs //#undef METATILEFALLBACK -// Metatiles are much larger in size so we don't need big queues to handle large areas +// Typical osm.org render server can render 7 metatiles per second, and has average load of 4.5 metatiles per second. +// Queue depth of (7 - 4.5) * 86400 = 216000 moves the load from the busy part of the day to the night time #ifdef METATILE #define QUEUE_MAX (64) #define REQ_LIMIT (32) -#define DIRTY_LIMIT (1000) - +#define DIRTY_LIMIT (216000) +#define HASHIDX_SIZE (477856) #else #define QUEUE_MAX (1024) #define REQ_LIMIT (512) #define DIRTY_LIMIT (10000) -#define HASHIDX_SIZE 22123 +#define HASHIDX_SIZE (22123) #endif // Penalty for client making an invalid request (in seconds) From 77d23f7056ce1bc55b6eb0be1c538d32c65b7237 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Mon, 9 Jan 2017 01:43:47 +0300 Subject: [PATCH 2/4] Fixed review notices --- includes/render_config.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/render_config.h b/includes/render_config.h index 0858710e..aa72c988 100644 --- a/includes/render_config.h +++ b/includes/render_config.h @@ -76,12 +76,10 @@ #define QUEUE_MAX (64) #define REQ_LIMIT (32) #define DIRTY_LIMIT (216000) -#define HASHIDX_SIZE (477856) #else #define QUEUE_MAX (1024) #define REQ_LIMIT (512) -#define DIRTY_LIMIT (10000) -#define HASHIDX_SIZE (22123) +#define DIRTY_LIMIT (2160000) #endif // Penalty for client making an invalid request (in seconds) From 6deaa835409fdcbc8b146a3ac32ad08fa4163eab Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Thu, 16 Nov 2017 19:10:11 +0300 Subject: [PATCH 3/4] Make hash index linearly larger --- includes/render_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/render_config.h b/includes/render_config.h index aa72c988..a53fd14b 100644 --- a/includes/render_config.h +++ b/includes/render_config.h @@ -72,14 +72,15 @@ // Typical osm.org render server can render 7 metatiles per second, and has average load of 4.5 metatiles per second. // Queue depth of (7 - 4.5) * 86400 = 216000 moves the load from the busy part of the day to the night time +#define DIRTY_LIMIT (216000) +#define HASHIDX_SIZE (477856) + #ifdef METATILE #define QUEUE_MAX (64) #define REQ_LIMIT (32) -#define DIRTY_LIMIT (216000) #else #define QUEUE_MAX (1024) #define REQ_LIMIT (512) -#define DIRTY_LIMIT (2160000) #endif // Penalty for client making an invalid request (in seconds) From bf4a7ca6a1a9963b7f8fe521d7ddcda1a1745370 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Thu, 16 Nov 2017 19:12:32 +0300 Subject: [PATCH 4/4] remove hash index size redeclaration --- includes/request_queue.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/includes/request_queue.h b/includes/request_queue.h index f8d5e797..a9da109c 100644 --- a/includes/request_queue.h +++ b/includes/request_queue.h @@ -28,8 +28,6 @@ extern "C" { #endif -#define HASHIDX_SIZE 2213 - typedef struct { long noDirtyRender; long noReqRender; @@ -79,5 +77,3 @@ void request_queue_copy_stats(struct request_queue * queue, stats_struct * stats } #endif #endif - -