samba413 Write Speed bei ~30MB/sec

carbuncle

Rainbow Six
Moin,

ich habe hier gerade frisch ein FreeBSD 13 mit samba aufgesetzt. Leider ist der write speed übers Netzwerk nur bei ca 30MByte/sec. Das kommt mir ein bisschen schwach vor. Samba ist version: samba413-4.13.7.

Evtl. liegt es ja auch an der zfs Performance (im mirror, 2 Platten). Hat jemand eine Idee wie ich erst mal den Speed der Platten testen kann?
 
Du koennstest auch mal schauen, ob in der smb.conf die write cache size gesetzt ist. Falls ja, spiele mal mit den Werten rum.
 
Ok hier das etwas nüchterne Ergebnis:
Code:
root@fswps01:/usr/home/j0b314 # zpool iostat zroot 0.5 100
              capacity     operations     bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
zroot       3.16G  1.36T      0     21  10.0K  2.26M
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0      0      0      0
zroot       3.16G  1.36T      0    288      0  2.05M
zroot       3.16G  1.36T      0    405      0  2.90M
zroot       3.16G  1.36T      0    400      0  2.85M
zroot       3.16G  1.36T      0    232      0  1.60M
zroot       3.16G  1.36T      0    453      0  3.07M
zroot       3.16G  1.36T      0    417      0  3.01M
zroot       3.16G  1.36T      0    411      0  2.85M
zroot       3.16G  1.36T      0    247      0  1.60M
zroot       3.16G  1.36T      0    446      0  3.01M
zroot       3.16G  1.36T      0    387      0  2.76M
zroot       3.16G  1.36T      0    454      0  3.07M
zroot       3.16G  1.36T      0    250      0  1.60M
zroot       3.16G  1.36T      0    437      0  2.94M
zroot       3.16G  1.36T      0    461      0  3.07M
zroot       3.16G  1.36T      0    244      0  1.55M
zroot       3.16G  1.36T      0    444      0  3.07M
zroot       3.16G  1.36T      0    427      0  3.03M
zroot       3.16G  1.36T      0    420      0  3.01M
zroot       3.16G  1.36T      0    434      0  3.01M
zroot       3.16G  1.36T      0    230      0  1.60M
zroot       3.16G  1.36T      0    430      0  2.96M
zroot       3.16G  1.36T      0    425      0  2.98M
zroot       3.16G  1.36T      0    246      0  1.60M
zroot       3.16G  1.36T      0    419      0  2.98M
zroot       3.16G  1.36T      0    419      0  3.08M
zroot       3.16G  1.36T      0    263      0  1.72M
zroot       3.16G  1.36T      0    423      0  3.07M

Und das sagt dd:
Code:
root@fswps01:~ # dd if=/dev/zero of=./test.bin bs=1m
^C19658+0 records in
19657+0 records out
20611858432 bytes transferred in 17.190467 secs (1199028439 bytes/sec)

Und hier die dmesg:
Code:
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9 04:24:09 UTC 2021
    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(efifb): resolution 800x600
CPU: AMD A4-5000 APU with Radeon(TM) HD Graphics     (1497.22-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x700f01  Family=0x16  Model=0x0  Stepping=1
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x3ed8220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x154037ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT,Topology,PNXC,DBE,PL2I>
  Structured Extended Features=0x8<BMI1>
  XSAVE Features=0x1<XSAVEOPT>
  SVM: NP,NRIP,AFlush,DAssist,NAsids=8
  TSC: P-state invariant, performance statistics
real memory  = 6442450944 (6144 MB)
avail memory = 5599608832 (5340 MB)
Event timer "LAPIC" quality 100
ACPI APIC Table: <ALASKA A M I>
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: unblocking device.
Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid Length but zero Address: 0x0000000000000000/0x1 (20201113/tbfadt-796)
ioapic0 <Version 2.1> irqs 0-23
ioapic1 <Version 2.1> irqs 24-55
Launching APs: 3 1 2
Timecounter "TSC" frequency 1497220983 Hz quality 1000
KTLS: Initialized 4 threads
random: entropy device external interface
[ath_hal] loaded
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 14.0.
kbd1 at kbdmux0
000.000058 [4354] netmap_init               netmap: loaded module
mlx5en: Mellanox Ethernet driver 3.6.0 (December 2020)
nexus0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cryptosoft0: <software crypto>
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS>
acpi0: <ALASKA A M I>
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xf000-0xf0ff mem 0xd0000000-0xdfffffff,0xe0000000-0xe07fffff,0xfeb00000-0xfeb3ffff irq 44 at device 1.0 on pci0
vgapci0: Boot video device
hdac0: <ATI (0x9840) HDA Controller> mem 0xfeb64000-0xfeb67fff irq 45 at device 1.1 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 29 at device 2.2 on pci0
pci1: <ACPI PCI bus> on pcib1
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xfea00000-0xfea00fff,0xe0800000-0xe0803fff irq 28 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: Chip rev. 0x4c000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: b8:97:5a:91:1b:0a
re0: netmap queues/slots: TX 1/256, RX 1/256
xhci0: <AMD FCH USB 3.0 controller> mem 0xfeb68000-0xfeb69fff irq 18 at device 16.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
ahci0: <AMD Hudson-2 AHCI SATA controller> port 0xf140-0xf147,0xf130-0xf133,0xf120-0xf127,0xf110-0xf113,0xf100-0xf10f mem 0xfeb6e000-0xfeb6e3ff irq 19 at device 17.0 on pci0
ahci0: AHCI v1.30 with 2 6Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ohci0: <AMD FCH USB Controller> mem 0xfeb6d000-0xfeb6dfff irq 18 at device 18.0 on pci0
usbus1 on ohci0
usbus1: 12Mbps Full Speed USB v1.0
ehci0: <AMD FCH USB 2.0 controller> mem 0xfeb6c000-0xfeb6c0ff irq 17 at device 18.2 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci0
usbus2: 480Mbps High Speed USB v2.0
ohci1: <AMD FCH USB Controller> mem 0xfeb6b000-0xfeb6bfff irq 18 at device 19.0 on pci0
usbus3 on ohci1
usbus3: 12Mbps Full Speed USB v1.0
ehci1: <AMD FCH USB 2.0 controller> mem 0xfeb6a000-0xfeb6a0ff irq 17 at device 19.2 on pci0
usbus4: EHCI version 1.0
usbus4 on ehci1
usbus4: 480Mbps High Speed USB v2.0
hdac1: <AMD Hudson-2 HDA Controller> mem 0xfeb60000-0xfeb63fff irq 16 at device 20.2 on pci0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
acpi_button0: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
ppc1: <Parallel port> port 0x378-0x37f irq 5 on acpi0
ppc1: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc1
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbdc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 14.
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
ugen3.1: <AMD OHCI root HUB> at usbus3
ugen4.1: <AMD EHCI root HUB> at usbus4
ugen1.1: <AMD OHCI root HUB> at usbus1
ugen0.1: <0x1022 XHCI root HUB> at usbus0
uhub0 on usbus3
uhub0: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
uhub1 on usbus4
uhub2 on usbus0
uhub2: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen2.1: <AMD EHCI root HUB> at usbus2
uhub3 on usbus1
uhub3: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
uhub1: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
hdacc0: <ATI R6xx HDA CODEC> at cad 0 on hdac0
hdaa0: <ATI R6xx Audio Function Group> at nid 1 on hdacc0
pcm0: <ATI R6xx (HDMI)> at nid 3 on hdaa0
pcm1: <ATI R6xx (HDMI)> at nid 5 on hdaa0
hdacc1: <Realtek ALC662 rev1 HDA CODEC> at cad 2 on hdac1
hdaa1: <Realtek ALC662 rev1 Audio Function Group> at nid 1 on hdacc1
pcm2: <Realtek ALC662 rev1 (Rear Analog)> at nid 20 and 24,26 on hdaa1
pcm3: <Realtek ALC662 rev1 (Front Analog)> at nid 27 and 25 on hdaa1
pcm4: <Realtek ALC662 rev1 (Rear Digital)> at nid 30 on hdaa1
uhub4 on usbus2
uhub4: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
Trying to mount root from zfs:zroot/ROOT/default []...
Root mount waiting for: usbus0 CAM usbus1 usbus2 usbus3 usbus4
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <SAMSUNG HD155UI 1AQ10001> ATA8-ACS SATA 2.x device
ada0: Serial Number S2HEJ1BB200248
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1430799MB (2930277168 512 byte sectors)
ada0: quirks=0x1<4K>
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <SAMSUNG HD155UI 1AQ10001> ATA8-ACS SATA 2.x device
ada1: Serial Number S2HEJ1BB200252
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 1430799MB (2930277168 512 byte sectors)
ada1: quirks=0x1<4K>
uhub0: 4 ports with 4 removable, self powered
uhub3: 4 ports with 4 removable, self powered
uhub2: 4 ports with 4 removable, self powered
Root mount waiting for: usbus2 usbus4
uhub1: 4 ports with 4 removable, self powered
uhub4: 4 ports with 4 removable, self powered
ugen1.2: <vendor 0x1a86 USB2.0-Serial> at usbus1
intsmb0: <AMD FCH SMBus Controller> at device 20.0 on pci0
smbus0: <System Management Bus> on intsmb0
lo0: link state changed to UP
re0: link state changed to DOWN
re0: link state changed to UP
uchcom0 on uhub3
uchcom0: <vendor 0x1a86 USB2.0-Serial, rev 1.10/2.63, addr 2> on usbus1
uchcom0: CH340 detected

Und hier die smb4.conf:
Code:
root@fswps01:/ # cat /usr/local/etc/smb4.conf
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
netbios name = odin
wins support = Yes
security = user
passdb backend = tdbsam

# Example: share /usr/src accessible only to 'developer' user
[public]
path = /zroot/public
valid users = @smbusers
writable  = yes
browsable = yes
read only = no
guest ok = no
public = no
create mask = 0666
directory mask = 0755
 
Die Frage ist auch, ist die Kiste zu langsam. Aber ein RPI4 schafft das doch auch. Zumindest so 80MB/sec. Ich habe powerd enabled. Vielleicht sollte ich den mal ausschalten.

Update:
scp schafft ca. 48 MB/sec mit ssh bei 99% Auslastung.
 
Zuletzt bearbeitet:
Alle gängigen Netzwerkdateisysteme schreiben auf dem Server synchron. Daher brauchen zwingen ein Log-Device im Pool, sonst ist es grottenlahm.
 
Aber ist der Speed dann wirklich soo schlecht?
Prüfe mal mit einer echten Windowskiste und großen Dateien, das sollte fix stiefeln.

Achja, die Werte zpool iostat sind Schnittwerte, für direkte benchmarks eher ungeeignet.

Die Hardware für den Zweck an sich ist nicht unterdimensioniert, die ist ok.
 
Prüfe mal mit einer echten Windowskiste und großen Dateien, das sollte fix stiefeln.

Achja, die Werte zpool iostat sind Schnittwerte, für direkte benchmarks eher ungeeignet.

Die Hardware für den Zweck an sich ist nicht unterdimensioniert, die ist ook.
Ok ich werde das mal an einer Windows testen. Mal gucken ob ich heute Abend noch dazu komme.
 
Womöglich bringt
Code:
[global]
use sendfile = yes
ebenfalls noch einen boost.
 
Womöglich bringt
Code:
[global]
use sendfile = yes
ebenfalls noch einen boost.
Jo das ist drin.

Aalso: Mit einem Windows 10 Client bekomme ich lesend konstant über 100MByte/sec. Schon ziemlich geil.

Allerdings bricht die Schreibleistung ein, so zwischen 30-50MByte/sec. Der Server hat 6GB Ram, vielleicht bringt hier mehr RAM was.

Meine vorigen Tests waren übrigens mit einem Manjaro Linux auf einem Core2Quad Q9400.
 
Der Server hat 6GB Ram, vielleicht bringt hier mehr RAM was.
Nope, das ist das synchrone Schreiben und das will man eigentlich, wenn die Daten wichtiger als der Durchsatz sind.

Alle mit Bedacht ausprobieren, alles asynchrone grillt Daten bei Stromausfall.
Code:
[global]
server multi channel support = yes
aio read size = 1
aio write size = 1
 
Haha, da hab ich mich gerade selbst verarscht. Ich bekomme mit Manjaro auch ca 50MB write speed, WENN: ich die Freigabe direkt mounte und nicht über den Thunar Dateimanager gehe. Der nutzt nämlich gvfs und das irgendwie dann fuse, was schnarchlahm ist...

Edit:
Ok, ich bekomme jetzt satte 100MB/sec write Speed bei 27 Watt Stromverbrauch. Sehr schön.

Hier ist die Samba config für interessierte:
Code:
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
netbios name = fswps01
wins support = no
security = user
passdb backend = tdbsam

use sendfile=true

# Example: share /usr/src accessible only to 'developer' user
[homes]
comment = Home directories
browseable = no
writeable = yes

[public]
path = /zroot/public
comment = Place for commonly used files
valid users = @smbusers
writable  = yes
browsable = yes
read only = no
guest ok = no
public = no
create mask = 0666
directory mask = 0775
 
Zuletzt bearbeitet:
Wenn du folgendes noch unter [global] hinzufügst, kannst du unter Windows die Funktion: "VSS" verwenden:
Bash:
  vfs objects = shadow_copy2, zfsacl
  shadow: snapdir = .zfs/snapshot
  shadow: sort = desc
  shadow: format = vss-%Y%m%d%H%M%S
  shadow: localtime = yes
Die Snapshots für ZFS kannst du so anlegen:
Bash:
zfs snapshot was/auch/immer@vss-$(date +%Y%m%d%H%M%S)
 
Zurück
Oben