Просмотр исходного кода

Tune HTTP server responsiveness under load

SybexXx 1 день назад
Родитель
Сommit
39644be436
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      code/main/server_main.cpp

+ 3 - 3
code/main/server_main.cpp

@@ -457,12 +457,12 @@ httpd_handle_t start_webserver(void)
     httpd_handle_t server = NULL;
     httpd_config_t config = HTTPD_DEFAULT_CONFIG();
 
-    config.task_priority = tskIDLE_PRIORITY+3; // previously -> 2022-12-11: tskIDLE_PRIORITY+1; 2021-09-24: tskIDLE_PRIORITY+5
-    config.stack_size = 12288; // previously -> 2023-01-02: 32768
+    config.task_priority = tskIDLE_PRIORITY+5; // Tested: higher server priority improves Web-UI responsiveness under load
+    config.stack_size = 8 * 2048; // 16 KB; tested with image and OTA requests
     config.core_id = 1; // previously -> 2023-01-02: 0, 2022-12-11: tskNO_AFFINITY;
     config.server_port = 80;
     config.ctrl_port = 32768;
-    config.max_open_sockets = 5; //20210921 --> previously 7   
+    config.max_open_sockets = 7; // Tested: allow more simultaneous Web-UI connections
     config.max_uri_handlers = 41; // Make sure this fits all URI handlers. Memory usage in bytes: 6*max_uri_handlers
     config.max_resp_headers = 8;                        
     config.backlog_conn = 5;