Open segfault-bilibili opened 1 month ago
Hi! Can you reproduce on a non-VPS device?
Okay I've successfully reproduced this problem inside virtual machines.
I'm running this test with VMware Workstation 17.5.2. There are two VMs involved. Both share one common host-only network. Both are booted with ubuntu-24.04-desktop-amd64.iso
.
edit: oh forgot to mention, the client VM is configured to have artificial 100ms outbound + 100ms inbound latency.
The server runs Caddy server v2.8.4 with this Caddyfile:
server.local {
bind SERVER_VM_IP
root * /var/www
file_server
tls internal
}
On the client VM:
ubuntu@ubuntu:~# ping server.local
PING server.local (SERVER_VM_IP) 56(84) bytes of data.
64 bytes from server.local (SERVER_VM_IP): icmp_seq=1 ttl=64 time=205 ms
64 bytes from server.local (SERVER_VM_IP): icmp_seq=2 ttl=64 time=205 ms
^C
--- server.local ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 204.965/205.100/205.236/0.135 ms
ubuntu@ubuntu:~# wget --no-check-certificate https://server.local/node.tar -O /dev/null
--2024-07-23 20:09:46-- https://server.local/node.tar
Resolving server.local (server.local)... SERVER_VM_IP
Connecting to server.local (server.local)|SERVER_VM_IP|:443... connected.
WARNING: cannot verify server.local's certificate, issued by ‘CN=Caddy Local Authority - ECC Intermediate’:
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 181248000 (173M) [application/x-tar]
Saving to: ‘/dev/null’
/dev/null 100%[===================>] 172.85M 12.0MB/s in 17s
2024-07-23 20:10:04 (10.3 MB/s) - ‘/dev/null’ saved [181248000/181248000]
ubuntu@ubuntu:~$ ~/node-v22.5.1-linux-x64/bin/node testdownload.js
connected
27 KB/s
31 KB/s
39 KB/s
62 KB/s
71 KB/s
71 KB/s
79 KB/s
102 KB/s
98 KB/s
98 KB/s
99 KB/s
99 KB/s
119 KB/s
119 KB/s
...
252 KB/s
252 KB/s
252 KB/s
253 KB/s
253 KB/s
(still running, seems to converge to about 250KB/s)
Node.js Version
v22.5.1
NPM Version
v10.8.2
Operating System
Linux VPS 6.8.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 7 15:25:01 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
http2
Description
As the title suggests, the downloading speed could be around 200-300KB/s if latency is about 200ms.
If the latency is negligible, like <5ms, the downloading speed seems to be normal.
I tried
createConnection
callback withtls.connect()
as well, after settinghighWaterMark
to1048576
the speed still didn't seem to recover to normal.Minimal Reproduction
curl --http2
to test download speed, which looks normal.Output
Before You Submit