On 28/4/19, 12:56 am, "owner-t...@openbsd.org on behalf of Otto Moerbeek"
<owner-t...@openbsd.org on behalf of o...@drijf.net> wrote:

>On Sat, Apr 27, 2019 at 04:43:14PM +0200, Otto Moerbeek wrote:
>
>> On Sat, Apr 27, 2019 at 04:37:23PM +0200, Antoine Jacoutot wrote:
>> 
>> > On Sat, Apr 27, 2019 at 09:55:33PM +0800, Nathanael Rensen wrote:
>> > > The diff below speeds up ld.so library intialisation where the
>>dependency
>> > > tree is broad and deep, such as samba's smbd which links over 100
>>libraries.
>> > > 
>> > > See for example
>>https://marc.info/?l=openbsd-misc&m=155007285712913&w=2
>> > > 
>> > > See https://marc.info/?l=openbsd-tech&m=155637285221396&w=2 for
>>part 1
>> > > that speeds up library loading.
>> > > 
>> > > The timings below are for /usr/local/sbin/smbd --version:
>> > > 
>> > > Timing without either diff  : 6m45.67s real  6m45.65s user
>>0m00.02s system
>> > > Timing with part 1 diff only: 4m42.88s real  4m42.85s user
>>0m00.02s system
>> > > Timing with part 2 diff only: 2m02.61s real  2m02.60s user
>>0m00.01s system
>> > > Timing with both diffs      : 0m00.03s real  0m00.03s user
>>0m00.00s system
>> > > 
>> > > Note that these timings are for a build of a recent samba master
>>tree
>> > > (linked with kerberos) which is probably slower than the OpenBSD
>>port.
>> > > 
>> > > Nathanael
>> > 
>> > Wow. Tried your part1 and part2 diffs and the difference is indeed
>>insane!
>> > mail/evolution always took 10+ seconds to start for me and now it's
>>almost
>> > instant...
>> > Crazy... But this sounds too good to be true ;-)
>> > What are the potential regressions?
>> 
>> Speaking off regression tests, we have quite en extensive collection.
>> The tests in libexec/ld.so should all pass.
>
>And the do on amd64
>
>> 
>>      -Otto
>> 
>> 

The results look good but it still doesn¹t resolve the root cause of the
issue.
Using both patches on old hardware helps speed up the process but I still
see the rc script timeout before smbd is loaded causing the rest of the
samba processes to fail to load. This did not happen under 6.4 (amd64) so
the change of linker / compiler update is still potentially where the
problem may lie. 

Starting smbd with both patches
 0m46.55s real     0m46.47s user     0m00.07s system


Would still be good to see this work committed though.

Ian McWilliam

OpenBSD 6.5 (GENERIC.MP) #0: Mon Apr 15 16:28:00 AEST 2019
    
ianm@ianm-openbsd65.localdomain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6424494080 (6126MB)
avail mem = 6220148736 (5931MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (55 entries)
bios0: vendor Award Software International, Inc. version "F10d" date
07/22/2010
bios0: Gigabyte Technology Co., Ltd. GA-MA790X-DS4
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP SSDT HPET MCFG APIC
acpi0: wakeup devices USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3)
USB5(S3) SBAZ(S4) P2P_(S5) PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4)
PCE7(S4) PCE8(S4) PCE9(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpihpet0 at acpi0: 14318180 Hz
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-255
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Phenom(tm) 9750 Quad-Core Processor, 2411.28 MHz, 10-02-03
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFL
USH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDT
SCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,
OSVW,IBS,ITSC
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache, 2MB 64b/line 32-way L3 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu0: AMD erratum 721 detected and fixed
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Phenom(tm) 9750 Quad-Core Processor, 2410.99 MHz, 10-02-03
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFL
USH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDT
SCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,
OSVW,IBS,ITSC
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache, 2MB 64b/line 32-way L3 cache
cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu1: AMD erratum 721 detected and fixed
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Phenom(tm) 9750 Quad-Core Processor, 2410.99 MHz, 10-02-03
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFL
USH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDT
SCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,
OSVW,IBS,ITSC
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache, 2MB 64b/line 32-way L3 cache
cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu2: AMD erratum 721 detected and fixed
cpu2: smt 0, core 3, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Phenom(tm) 9750 Quad-Core Processor, 2410.99 MHz, 10-02-03
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFL
USH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDT
SCP,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,
OSVW,IBS,ITSC
cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache, 2MB 64b/line 32-way L3 cache
cpu3: ITLB 32 4KB entries fully associative, 16 4MB entries fully
associative
cpu3: DTLB 48 4KB entries fully associative, 48 4MB entries fully
associative
cpu3: AMD erratum 721 detected and fixed
cpu3: smt 0, core 2, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins, remapped
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (P2P_)
acpiprt2 at acpi0: bus 1 (PCE2)
acpiprt3 at acpi0: bus -1 (PCE3)
acpiprt4 at acpi0: bus -1 (PCE4)
acpiprt5 at acpi0: bus -1 (PCE5)
acpiprt6 at acpi0: bus -1 (PCE6)
acpiprt7 at acpi0: bus -1 (PCE7)
acpiprt8 at acpi0: bus -1 (PCE8)
acpiprt9 at acpi0: bus -1 (PCE9)
acpiprt10 at acpi0: bus 2 (PCEA)
acpiprt11 at acpi0: bus -1 (PCEB)
acpiprt12 at acpi0: bus -1 (PCEC)
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
acpicpu2 at acpi0: C1(@1 halt!), PSS
acpicpu3 at acpi0: C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
acpipci0 at acpi0 PCI0: _OSC failed
acpicmos0 at acpi0
cpu0: 2411 MHz: speeds: 2400 1200 MHz
pci0 at mainbus0 bus 0
0:0:0: mem address conflict 0xe0000000/0x20000000
pchb0 at pci0 dev 0 function 0 "ATI RD780 HT-PCIE" rev 0x00
ppb0 at pci0 dev 2 function 0 "ATI RD790 PCIE" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 8400 GS" rev 0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 10 function 0 "ATI RD790 PCIE" rev 0x00
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 2 (0x3800),
msi, address 00:1f:d0:a4:c0:03
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 2
ahci0 at pci0 dev 18 function 0 "ATI SB600 SATA" rev 0x00: apic 2 int 22,
AHCI 1.1
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 3.0Gb/s
ahci0: port 2: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HDS72105, JP2O> SCSI3 0/direct
fixed naa.5000cca374f45c20
sd0: 476935MB, 512 bytes/sector, 976764911 sectors
sd1 at scsibus1 targ 1 lun 0: <ATA, SAMSUNG HD501LJ, CR10> SCSI3 0/direct
fixed naa.50000f00db208553
sd1: 476938MB, 512 bytes/sector, 976771055 sectors
cd0 at scsibus1 targ 2 lun 0: <HL-DT-ST, DVDRAM GH22NS50, TN03> ATAPI
5/cdrom removable
ohci0 at pci0 dev 19 function 0 "ATI SB600 USB" rev 0x00: apic 2 int 16,
version 1.0, legacy support
ohci1 at pci0 dev 19 function 1 "ATI SB600 USB" rev 0x00: apic 2 int 17,
version 1.0, legacy support
ohci2 at pci0 dev 19 function 2 "ATI SB600 USB" rev 0x00: apic 2 int 18,
version 1.0, legacy support
ohci3 at pci0 dev 19 function 3 "ATI SB600 USB" rev 0x00: apic 2 int 17,
version 1.0, legacy support
ohci4 at pci0 dev 19 function 4 "ATI SB600 USB" rev 0x00: apic 2 int 18,
version 1.0, legacy support
ehci0 at pci0 dev 19 function 5 "ATI SB600 USB2" rev 0x00: apic 2 int 19
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
piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x14: SMI
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5
spdmem1 at iic0 addr 0x51: 2GB DDR2 SDRAM non-parity PC2-6400CL5
spdmem2 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-6400CL6
spdmem3 at iic0 addr 0x53: 1GB DDR2 SDRAM non-parity PC2-6400CL6
pciide0 at pci0 dev 20 function 1 "ATI SB600 IDE" rev 0x00: DMA, channel 0
configured to compatibility, channel 1 configured to compatibility
azalia0 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x00: apic 2
int 16
azalia0: codecs: Realtek ALC885
audio0 at azalia0
pcib0 at pci0 dev 20 function 3 "ATI SB600 ISA" rev 0x00
ppb2 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x00
pci3 at ppb2 bus 3
"TI TSB43AB23 FireWire" rev 0x00 at pci3 dev 14 function 0 not configured
pchb1 at pci0 dev 24 function 0 "AMD AMD64 10h HyperTransport" rev 0x00
pchb2 at pci0 dev 24 function 1 "AMD AMD64 10h Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 10h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 10h Misc Cfg" rev 0x00
pchb4 at pci0 dev 24 function 4 "AMD AMD64 10h Link Cfg" rev 0x00
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "ATI OHCI root hub" rev
1.00/1.00 addr 1
usb2 at ohci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "ATI OHCI root hub" rev
1.00/1.00 addr 1
usb3 at ohci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "ATI OHCI root hub" rev
1.00/1.00 addr 1
usb4 at ohci3: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "ATI OHCI root hub" rev
1.00/1.00 addr 1
usb5 at ohci4: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "ATI OHCI root hub" rev
1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x2e/2: IT8718F rev 5, EC port 0x228
vmm0 at mainbus0: SVM/RVI
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (f0dd5c5b4051779c.a) swap on sd1b dump on sd1b





>

Reply via email to