NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Poor SSD write performance (new install)



Hello,

My new installation of "NetBSD  6.1.1 NetBSD 6.1.1 (GENERIC) i386" on an HP Mini 1000 netbook (made in 2009) is performing quite poorly when writing to the internal sata SSD.

Specifically, copying large files from a tmpfs mount to home yields only 40% of that of Linux 3.0.21 on the same machine.  This is independent of the fs mounted in NetBSD (both ffs and ext2 give this result).

For small files, the difference is even greater: NetBSD only performs copies from tmpfs to home (ffs) at about 12% performance compared to Linux.  (Copying from tmpfs to ext2 is even worse, but that is probably to be expected.)  Here, "small files" means tar xf /tmp/pkgsrc.tar.

Since the performance problems appear in both filesystems when booting NetBSD, and not in ext2 when booting Linux, I am concluding that the slowdown is not due to unaligned partitions.  To be sure, here is my disklabel output, which should show alignment along 4k blocks (hence starting at sector 64 and not 63):

disklabel wd0 output:

# /dev/rwd0d:
type: unknown
disk: SanDisk pSSD 16
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 31760
total sectors: 32014080
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   7863408        64     4.2BSD   2048 16384     0  # (Cyl.      0*-   7801*)
 b:    525200   7863472       swap                     # (Cyl.   7801*-   8322*)
 c:   8388608        64     unused      0     0        # (Cyl.      0*-   8322*)
 d:  32014080         0     unused      0     0        # (Cyl.      0 -  31759)
 e:   4194304   8388672 Linux Ext2      0     0        # (Cyl.   8322*-  12483*)


fdisk wd0 gives the following:

Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 31760, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 32014080

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 32014080

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
    bootmenu: nbsd
    start 64, size 8388608 (4096 MB, Cyls 0/1/2-522/43/33), Active
1: Linux native (sysid 131)
    bootmenu: lin
    start 8388672, size 4194304 (2048 MB, Cyls 522/43/34-783/64/49)
        PBR is not bootable: All bytes are identical (0x00)
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0

Finally, here are the dmesg lines relevent to wd0:

wd0 at atabus0 drive 0
wd0: <SanDisk pSSD 16GB>
wd0: drive supports 4-sector PIO transfers, LBA addressing
wd0: 15631 MB, 31760 cyl, 16 head, 63 sec, 512 bytes/sect x 32014080 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA)
uvideo0 at uhub4 port 4 configuration 1 interface 0: importek Webcam-101, rev 2.00/15.12, addr 3
video0 at uvideo0: importek Webcam-101, rev 2.00/15.12, addr 3
Kernelized RAIDframe activated
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

Thanks for reading!
-Nick


Home | Main Index | Thread Index | Old Index