Чтобы вылечить падение по TIME_WAIT надо править lwip. Подсчет количества в списке tcp_tw_pcbs lwip не ведет, соединение убивают когда malloc вернет 0 и то всего 1 штуку. А когда pvPortMalloc возвращает 0 система уже труп - не оживет.Даже на RTL8711AM падет - в основном, RTOS пишет что беда со стеком
В 6.3 изменений в tcp_alloc и tcp_kill_timewait по сравнению с 1.4.1 нет.
Попробую переключить lwip на его встроенный аллокатор.
---
поменял:
Код:
-#define MEMP_MEM_MALLOC 1
+#define MEMP_MEM_MALLOC 0
Код:
ab -n1000 -c4 http://192.168.1.107/test/test.cgi?len=131072
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.1.107 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: esp8266-httpd/0.4
Server Hostname: 192.168.1.107
Server Port: 80
Document Path: /test/test.cgi?len=131072
Document Length: 131072 bytes
Concurrency Level: 4
Time taken for tests: 70.962 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 131249000 bytes
HTML transferred: 131072000 bytes
Requests per second: 14.09 [#/sec] (mean)
Time per request: 283.848 [ms] (mean)
Time per request: 70.962 [ms] (mean, across all concurrent requests)
Transfer rate: 1806.22 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 3 1.8 3 17
Processing: 175 280 167.3 272 3892
Waiting: 3 9 112.0 5 3548
Total: 177 284 167.5 275 3897
Percentage of the requests served within a certain time (ms)
50% 275
66% 286
75% 291
80% 296
90% 308
95% 336
98% 371
99% 394
100% 3897 (longest request)
Последнее редактирование: