Cloudflare pages very slow

Cloudflare has become very(!) slow for me. Before I was just proxying my VPS. To remove this from the equation I moved the site(s) directly to Cloudflare pages. Unfortunately this did not help much. Sometimes I am still looking at only 40-100Kbytes/sec for some images. It takes so long that Lighthouse times out. I tried from various locations. What is going on? How can I track down this down?
ab -n 10 https://torstencurdt.com/
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking torstencurdt.com (be patient).....done


Server Software: cloudflare
Server Hostname: torstencurdt.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-ECDSA-CHACHA20-POLY1305,256,256
Server Temp Key: ECDH X25519 253 bits
TLS Server Name: torstencurdt.com

Document Path: /
Document Length: 18823 bytes

Concurrency Level: 1
Time taken for tests: 5.435 seconds
Complete requests: 10
Failed requests: 0
Total transferred: 195598 bytes
HTML transferred: 188230 bytes
Requests per second: 1.84 [#/sec] (mean)
Time per request: 543.523 [ms] (mean)
Time per request: 543.523 [ms] (mean, across all concurrent requests)
Transfer rate: 35.14 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 332 339 12.8 336 375
Processing: 173 204 38.4 194 284
Waiting: 163 194 39.1 181 276
Total: 508 543 39.9 531 618

Percentage of the requests served within a certain time (ms)
50% 531
66% 534
75% 569
80% 603
90% 618
95% 618
98% 618
99% 618
100% 618 (longest request)
ab -n 10 https://torstencurdt.com/
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking torstencurdt.com (be patient).....done


Server Software: cloudflare
Server Hostname: torstencurdt.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-ECDSA-CHACHA20-POLY1305,256,256
Server Temp Key: ECDH X25519 253 bits
TLS Server Name: torstencurdt.com

Document Path: /
Document Length: 18823 bytes

Concurrency Level: 1
Time taken for tests: 5.435 seconds
Complete requests: 10
Failed requests: 0
Total transferred: 195598 bytes
HTML transferred: 188230 bytes
Requests per second: 1.84 [#/sec] (mean)
Time per request: 543.523 [ms] (mean)
Time per request: 543.523 [ms] (mean, across all concurrent requests)
Transfer rate: 35.14 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 332 339 12.8 336 375
Processing: 173 204 38.4 194 284
Waiting: 163 194 39.1 181 276
Total: 508 543 39.9 531 618

Percentage of the requests served within a certain time (ms)
50% 531
66% 534
75% 569
80% 603
90% 618
95% 618
98% 618
99% 618
100% 618 (longest request)
2 Replies
tcurdt
tcurdt8mo ago
I must be missing something. I don't see the server timing header. I dug a bit deeper with some curl stats:
$ curl -o /dev/null -s https://torstencurdt.com/assets/img/torstencurdt.png


==== cURL measurements stats ====
total: 0.718166 seconds
size: 272372 bytes
dnslookup: 0.046982 seconds
connect: 0.157048 seconds
appconnect: 0.280002 seconds
redirect: 0.000000 seconds
pretransfer: 0.280193 seconds
starttransfer: 0.414308 seconds
downloadspeed: 379260 byte/sec
uploadspeed: 0 byte/sec
$ curl -o /dev/null -s https://torstencurdt.com/assets/img/torstencurdt.png


==== cURL measurements stats ====
total: 0.718166 seconds
size: 272372 bytes
dnslookup: 0.046982 seconds
connect: 0.157048 seconds
appconnect: 0.280002 seconds
redirect: 0.000000 seconds
pretransfer: 0.280193 seconds
starttransfer: 0.414308 seconds
downloadspeed: 379260 byte/sec
uploadspeed: 0 byte/sec
But on the response I don't see any server timings:
* [HTTP/2] [1] OPENED stream for https://torstencurdt.com/assets/img/torstencurdt.png
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: torstencurdt.com]
* [HTTP/2] [1] [:path: /assets/img/torstencurdt.png]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: */*]
> GET /assets/img/torstencurdt.png HTTP/2
> Host: torstencurdt.com
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/2 200
< date: Wed, 28 Feb 2024 11:05:49 GMT
< content-type: image/png
< content-length: 272372
< access-control-allow-origin: *
< cache-control: public, max-age=0, must-revalidate
< etag: "2fb774ab337bfccc5808a0dfb9836553"
< referrer-policy: strict-origin-when-cross-origin
< x-content-type-options: nosniff
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=kcETRjFoZQ4k2tVuB5LZJuxtr3mhfikHxrLBusnLzPc%2Fiih6Q037u1491SuDfYYKB8OVNL9f%2B1OHqc0oyf4HVGxYNqXcjf5bYsqKZiHglfKGdkiAwZLp53MtqJCwGxh%2B1uK8"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< vary: Accept-Encoding
< cf-cache-status: REVALIDATED
< accept-ranges: bytes
< server: cloudflare
< cf-ray: 85c831d368cc4219-EWR
< alt-svc: h3=":443"; ma=86400
<
{ [6836 bytes data]
* [HTTP/2] [1] OPENED stream for https://torstencurdt.com/assets/img/torstencurdt.png
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: torstencurdt.com]
* [HTTP/2] [1] [:path: /assets/img/torstencurdt.png]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: */*]
> GET /assets/img/torstencurdt.png HTTP/2
> Host: torstencurdt.com
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/2 200
< date: Wed, 28 Feb 2024 11:05:49 GMT
< content-type: image/png
< content-length: 272372
< access-control-allow-origin: *
< cache-control: public, max-age=0, must-revalidate
< etag: "2fb774ab337bfccc5808a0dfb9836553"
< referrer-policy: strict-origin-when-cross-origin
< x-content-type-options: nosniff
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=kcETRjFoZQ4k2tVuB5LZJuxtr3mhfikHxrLBusnLzPc%2Fiih6Q037u1491SuDfYYKB8OVNL9f%2B1OHqc0oyf4HVGxYNqXcjf5bYsqKZiHglfKGdkiAwZLp53MtqJCwGxh%2B1uK8"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< vary: Accept-Encoding
< cf-cache-status: REVALIDATED
< accept-ranges: bytes
< server: cloudflare
< cf-ray: 85c831d368cc4219-EWR
< alt-svc: h3=":443"; ma=86400
<
{ [6836 bytes data]
That said, with 380k/s it's currently 10x faster than the slow times I have seen.
Want results from more Discord servers?
Add your server