Hi
When an HTTP request for a (large) file is made directly to httpd, the transfer speed is what's expected from the infrastructure: a 92Mb file is transferred in under a second. However, when relayd is placed in front of httpd (running on the same host), the transfer rate drops to about 200 kB/s. Is this expected? I can easily reproduce this with a relayd.conf as simple as: table <internal> { 127.0.0.1 } http protocol "http_revproxy" { return error match forward to <internal> pass } relay "http_revproxy" { listen on 10.17.18.10 port 80 protocol "http_revproxy" forward to <internal> port 80 } (Side note: I am well aware that with this configuration it is pointless to run relayd. The actual configuration being used has more match and pass rules on the protocol section, and forwarding to other ports. However, the config above is enough to reproduce the issue.) To confuse things a bit, the speed drop only happens when the request comes from a host other than the server. Things flow normally when the request comes from the machine serving the files (still directed at the ip:port where relayd listens on, obviously). Further info: - This is on amd64-stable (7.6), dmesg below - The machine is a bit old, but systat during the transfer shows nothing suspicious, AFAICT: CPU is about 90% idle during the transfer, plenty of free memory - pf is disabled, - The hosts making the requests are on the same subnet as the server, with only a switch between both machines - Again, requesting directly to httpd yields an appropriate transfer speed, as does using SCP or NFS I know there have been some changes in the forwarding of Content-Length headers in relayd, but that was pre-7.6. Any clue as to what may be going on? Thanks in advance -- OpenBSD 7.6 (GENERIC.MP) #338: Mon Sep 30 08:55:35 MDT 2024 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 6391660544 (6095MB) avail mem = 6174715904 (5888MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xfb330 (35 entries) bios0: vendor HP version "O41" date 10/01/2013 bios0: HP ProLiant MicroServer acpi0 at bios0: ACPI 3.0 acpi0: sleep states S0 S4 S5 acpi0: tables DSDT FACP APIC MCFG SPMI OEMB HPET EINJ BERT ERST HEST SSDT acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4) PCE7(S4) PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) PE20(S4) PE21(S4) PE22(S4) PE23(S4) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Turion(tm) II Neo N40L Dual-Core Processor, 1497.76 MHz, 10-06-03, patch 010000c8 cpu0: cpuid 1 edx=178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT> ecx=802009<SSE3,MWAIT,CX16,POPCNT> cpu0: cpuid 80000001 edx=efd3fbff<NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,3DNOW2,3DNOW> ecx=837ff<LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,NODEID> cpu0: cpuid 80000007 edx=1f9<HWPSTATE,ITSC> cpu0: 64KB 64b/line 2-way D-cache, 64KB 64b/line 2-way I-cache cpu0: 1MB 64b/line 16-way L2 cache cpu0: smt 0, core 0, package 0 cpu0: AMD erratum 721 detected and fixed mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 199MHz cpu0: mwait min=64, max=64, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Turion(tm) II Neo N40L Dual-Core Processor, 1497.62 MHz, 10-06-03, patch 010000c8 cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins acpimcfg0 at acpi0 acpimcfg0: addr 0xe0000000, bus 0-255 acpihpet0 at acpi0: 14318180 Hz acpi0: unable to load \\_SB_._INI.EXH2 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (P0P1) acpiprt2 at acpi0: bus -1 (PCE2) acpiprt3 at acpi0: bus -1 (PCE4) acpiprt4 at acpi0: bus 2 (PCE6) acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000 acpicmos0 at acpi0 acpibtn0 at acpi0: PWRB acpicpu0 at acpi0: C1(@1 halt!), PSS acpicpu1 at acpi0: C1(@1 halt!), PSS ipmi at mainbus0 not configured cpu0: 1497 MHz: speeds: 1500 1300 1000 800 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "AMD RS880 Host" rev 0x00 ppb0 at pci0 dev 1 function 0 vendor "Hewlett-Packard", unknown product 0x9602 rev 0x00 pci1 at ppb0 bus 1 radeondrm0 at pci1 dev 5 function 0 "ATI Mobility Radeon HD 4200" rev 0x00 drm0 at radeondrm0 radeondrm0: apic 2 int 18 ppb1 at pci0 dev 6 function 0 "AMD RS780 PCIE" rev 0x00 pci2 at ppb1 bus 2 bge0 at pci2 dev 0 function 0 "Broadcom BCM5723" rev 0x10, BCM5784 A1 (0x5784100): msi, address a0:b3:cc:eb:0f:2a brgphy0 at bge0 phy 1: BCM5784, rev. 4 ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 2 int 19, AHCI 1.2 ahci0: port 0: 3.0Gb/s ahci0: port 1: 3.0Gb/s ahci0: port 2: 3.0Gb/s ahci0: port 3: 3.0Gb/s ahci0: port 4: 1.5Gb/s ahci0: port 5: 3.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, VB0250EAVER, HPG7> naa.5000c5004defbb82 sd0: 238475MB, 512 bytes/sector, 488397168 sectors sd1 at scsibus1 targ 1 lun 0: <ATA, WDC WD40EFAX-68J, 82.0> naa.50014ee212e0faf4 sd1: 3815447MB, 512 bytes/sector, 7814037168 sectors, thin sd2 at scsibus1 targ 2 lun 0: <ATA, WDC WD40EFAX-68J, 82.0> naa.50014ee212e0faef sd2: 3815447MB, 512 bytes/sector, 7814037168 sectors, thin sd3 at scsibus1 targ 3 lun 0: <ATA, WDC WD10EFRX-68F, 82.0> naa.50014ee265b87652 sd3: 953869MB, 512 bytes/sector, 1953525168 sectors sd4 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG HM080HI, AB10> t10.ATA_SAMSUNG_HM080HI_S0KGJ10P134018 sd4: 76319MB, 512 bytes/sector, 156301488 sectors sd5 at scsibus1 targ 5 lun 0: <ATA, WDC WD40EFAX-68J, 82.0> naa.50014ee2bd8c2de1 sd5: 3815447MB, 512 bytes/sector, 7814037168 sectors, thin ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at pci0 dev 19 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support ehci1 at pci0 dev 19 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1 piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x42: SMI iic0 at piixpm0 sdtemp0 at iic0 addr 0x18: mcp98243 sdtemp1 at iic0 addr 0x19: mcp98243 spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM ECC PC3-10600 with thermal sensor spdmem1 at iic0 addr 0x51: 2GB DDR3 SDRAM ECC PC3-10600 with thermal sensor pcib0 at pci0 dev 20 function 3 "ATI SB700 ISA" rev 0x40 ppb2 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x40 pci3 at ppb2 bus 3 ohci2 at pci0 dev 22 function 0 "ATI SB700 USB" rev 0x00: apic 2 int 18, version 1.0, legacy support ehci2 at pci0 dev 22 function 2 "ATI SB700 USB2" rev 0x00: apic 2 int 17 usb2 at ehci2: USB revision 2.0 uhub2 at usb2 configuration 1 interface 0 "ATI EHCI root hub" rev 2.00/1.00 addr 1 pchb1 at pci0 dev 24 function 0 "AMD 10h HyperTransport" rev 0x00 pchb2 at pci0 dev 24 function 1 "AMD 10h Address Map" rev 0x00 pchb3 at pci0 dev 24 function 2 "AMD 10h DRAM Cfg" rev 0x00 km0 at pci0 dev 24 function 3 "AMD 10h Misc Cfg" rev 0x00 pchb4 at pci0 dev 24 function 4 "AMD 10h Link Cfg" rev 0x00 usb3 at ohci0: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1 usb4 at ohci1: USB revision 1.0 uhub4 at usb4 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 usb5 at ohci2: USB revision 1.0 uhub5 at usb5 configuration 1 interface 0 "ATI OHCI root hub" rev 1.00/1.00 addr 1 vmm0 at mainbus0: SVM/RVI uplcom0 at uhub3 port 3 configuration 1 interface 0 "Prolific Technology Inc. USB-Serial Controller D" rev 1.10/3.00 addr 2 ucom0 at uplcom0: usb3.0.00003.0 uslcom0 at uhub3 port 4 configuration 1 interface 0 "ITead Sonoff Zigbee 3.0 USB Dongle Plus" rev 2.00/1.00 addr 3 ucom1 at uslcom0 portno 0: usb3.0.00004.0 ugen0 at uhub3 port 5 "American Power Conversion Smart-UPS 750 FW:UPS 09.4 / ID=18" rev 2.00/1.06 addr 4 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (77c919e96ceaf0e9.a) swap on sd0b dump on sd0b radeondrm0: RS880 radeon_audio_component_init: stub drm:pid0:drm_fb_helper_find_format *WARNING* [drm] bpp/depth value of 16/16 not supported drm:pid0:drm_fb_helper_find_format *WARNING* [drm] bpp/depth value of 16/16 not supported drm:pid0:__drm_fb_helper_find_sizes *WARNING* [drm] No compatible format found radeondrm0: 1024x768, 32bpp wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) --