GIGABYTE GA-Z68X-UD3H-B3 Problem

Code:
uname -a
FreeBSD 10.2-STABLE #0 r308101M

I have a workstation with the following motherboard and main system drive:

GIGABYTE GA-Z68X-UD3H-B3 LGA 1155 Intel Z68 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
https://www.newegg.com/Product/Product.aspx?Item=N82E16813128498

Seagate Desktop HDD ST4000DM000 4TB 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive Bare Drive
https://www.newegg.com/Product/Product.aspx?Item=N82E16822178338

I have had this workstation for a few years and have not had any problems with uptimes of a year between power failures and system upgrade reboots.

However, I get terrible disk performance.

The main 4TB drive ZFS. Copying files on the same drive gives speeds in the 5-20kB/sec range. In addition to the slow copy speeds, any type of continuous disk activity results in the system feeling sluggish - as if the disk operations are not being performed asynchronously. The mouse and other window dragging/scrolling operations are unaffected but as soon as the app accesses the drive it appears to stall while waiting for the background file copying to proceed for a second or so before continuing on.

I have rebooted the same motherboard with different drives that have Windows and Linux and there is no sign of the performance problems I am seeing with FreeBSD. No matter how many or how big the file operations are going on, both Windows and Linux continue to operate as if the background copy operations didn't exist.
 
The main 4TB drive ZFS. Copying files on the same drive gives speeds in the 5-20kB/sec range. In addition to the slow copy speeds, any type of continuous disk activity results in the system feeling sluggish

What about sector size and 4Kb sector alignment ?
Code:
zdb | grep ashift
gpart show -p
diskinfo -v /dev/ada....
 
After a year or more of contiuous operation of the Seagate Desktop drive I would expect it to be almost dead.
Desktop harddrives usually try to read from bad sectors again and again and again, where a server harddrive would have gone offline/faulted long ago which then would show up in the zpool status.
Back up your data just to be on the safe side!

I can't really remember how that "read error" messages looked like, but they might appear in /var/log/messages and definitively on the console on ttyv0.

I assume you haven't filled up the harddrive to more than 80% of it's capacity and there is no swapping or a scrub going on in the background?
 
Thank you for the replies.

What about sector size and 4Kb sector alignment ?
Code:
zdb | grep ashift
gpart show -p
diskinfo -v /dev/ada....

Code:
zdb | grep ashift
            ashift: 12

Code:
gpart show -p /dev/ada0
=>        34  7814037101    ada0  GPT  (3.6T)
          34           6          - free -  (3.0K)
          40         256  ada0p1  freebsd-boot  (128K)
         296  7814036832  ada0p2  freebsd-zfs  (3.6T)
  7814037128           7          - free -  (3.5K)

Code:
diskinfo -v /dev/ada
/dev/ada0
        512             # sectorsize
        4000787030016   # mediasize in bytes (3.6T)
        7814037168      # mediasize in sectors
        4096            # stripesize
        0               # stripeoffset
        7752021         # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        S300Y252        # Disk ident.

Disk capacity is at 53%.
 
After a year or more of contiuous operation of the Seagate Desktop drive I would expect it to be almost dead.
Desktop harddrives usually try to read from bad sectors again and again and again, where a server harddrive would have gone offline/faulted long ago which then would show up in the zpool status.
Back up your data just to be on the safe side!

I can't really remember how that "read error" messages looked like, but they might appear in /var/log/messages and definitively on the console on ttyv0.

I assume you haven't filled up the harddrive to more than 80% of it's capacity and there is no swapping or a scrub going on in the background?

Thank you for the reply.

It is definitely time to upgrade the system or just replace it. I am doing another zpool status right now and there are no errors reported so far and I haven't had any in any previous checks.

The poor performance has been the same since I first got the system and there has been no degradation over time.

For the work the system has been used for the poor performance hasn't been anything other than an annoyance, but it is getting time to upgrade and I want to make sure I don't make the same mistake again in setting up and configuring the system. And the system is still working perfectly fine other than the the poor heavy read/write disk performance.

For almost all normal use with nothing more than small and random disk reads and writes there is no noticeable performance problems. It's only when a large number of files or continuous disk activity is going on like copying a large directory to the same disk that it feels like every single disk operation is blocking all other disk activity.
 
Not a problem related to sector size, ZFS block size is 4KB, and your ZFS partition look 4KB aligned.
Please try:
Code:
diskinfo -ct /dev/ada0
that will measure the raw disk performance, independently from partitions and filesystem; if the result will be very low it will be an hint about something wrong with the disk itself, I would leave out the controller due to your report about working well with other OSes.
 
Not a problem related to sector size, ZFS block size is 4KB, and your ZFS partition look 4KB aligned.
Please try:
Code:
diskinfo -ct /dev/ada0
that will measure the raw disk performance, independently from partitions and filesystem; if the result will be very low it will be an hint about something wrong with the disk itself, I would leave out the controller due to your report about working well with other OSes.

I am doing a zpool scrub right now. Don't know if that makes these numbers valid. Another eight hours before the scrub is done.

Code:
diskinfo -ct /dev/ada0
/dev/ada0
        512             # sectorsize
        4000787030016   # mediasize in bytes (3.6T)
        7814037168      # mediasize in sectors
        4096            # stripesize
        0               # stripeoffset
        7752021         # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        S300Y252        # Disk ident.

I/O command overhead:
        time to read 10MB block      2.939274 sec       =    0.144 msec/sector
        time to read 20480 sectors 202.637074 sec       =    9.894 msec/sector
        calculated command overhead                     =    9.751 msec/sector

Seek times:
        Full stroke:      250 iter in  18.556199 sec =   74.225 msec
        Half stroke:      250 iter in  15.081579 sec =   60.326 msec
        Quarter stroke:   500 iter in  18.346530 sec =   36.693 msec
        Short forward:    400 iter in   7.620984 sec =   19.052 msec
        Short backward:   400 iter in   8.640411 sec =   21.601 msec
        Seq outer:       2048 iter in  28.475542 sec =   13.904 msec
        Seq inner:       2048 iter in  31.672216 sec =   15.465 msec
Transfer rates:
        outside:       102400 kbytes in  29.238104 sec =     3502 kbytes/sec
        middle:        102400 kbytes in  17.524583 sec =     5843 kbytes/sec
        inside:        102400 kbytes in  21.467797 sec =     4770 kbytes/sec
 
Code:
Transfer rates:
       outside:       102400 kbytes in  29.238104 sec =     3502 kbytes/sec
        middle:        102400 kbytes in  17.524583 sec =     5843 kbytes/sec
        inside:        102400 kbytes in  21.467797 sec =     4770 kbytes/sec

Those values are below any reasonable limit ... should be > 150 MB/s

Next, install the pkg smartmontools, and try:
Code:
smartctl -t short /dev/ada0
# wait the time reported from the above command
smartctl -l selftest /dev/ada0

Code:
smartctl  -a  /dev/ada0
will also report significative information about the disk health.
 
The test seems to be stuck at 10%.

Code:
smartctl  -a  /dev/ada0

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Desktop HDD.15
Device Model:     ST4000DM000-1F2168
Serial Number:    S300Y252
LU WWN Device Id: 5 000c50 0756a8366
Firmware Version: CC52
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5900 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Jan 29 17:47:35 2017 PST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)    Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      ( 241)    Self-test routine in progress...
                    10% of test remaining.
Total time to complete Offline
data collection:         (  623) seconds.
Offline data collection
capabilities:             (0x73) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    General Purpose Logging supported.
Short self-test routine
recommended polling time:     (   1) minutes.
Extended self-test routine
recommended polling time:     ( 513) minutes.
Conveyance self-test routine
recommended polling time:     (   2) minutes.
SCT capabilities:           (0x1085)    SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   117   099   006    Pre-fail  Always       -       131112440
  3 Spin_Up_Time            0x0003   092   092   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       28
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   084   060   030    Pre-fail  Always       -       308053340
  9 Power_On_Hours          0x0032   084   084   000    Old_age   Always       -       14778
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       29
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0 0 0
189 High_Fly_Writes         0x003a   096   096   000    Old_age   Always       -       4
190 Airflow_Temperature_Cel 0x0022   058   054   045    Old_age   Always       -       42 (Min/Max 16/43)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       25
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       181
194 Temperature_Celsius     0x0022   042   046   000    Old_age   Always       -       42 (0 16 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       14770h+49m+26.222s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       75447467188
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       35570922255

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Self-test routine in progress 10%     14778         -
# 2  Short offline       Aborted by host               10%     14777         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
 
as far as I can see, those two are the only suspect values, seems high to me ...
Code:
  1 Raw_Read_Error_Rate     0x000f   117   099   006    Pre-fail  Always       -       131112440
  7 Seek_Error_Rate         0x000f   084   060   030    Pre-fail  Always       -       308053340

somewhat aged, but consistent with 24x7 power-on
Code:
  9 Power_On_Hours          0x0032   084   084   000    Old_age   Always       -       14778

Not a single bad sector reported:
Code:
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

About the test aborted at 10% ... most likely because there the scrub in progress.
 
have you tried to substitute the sata cable ?

I haven't. Tomorrow after the scrub is done I will try swapping the cable.

Is there possibly some setting for the motherboard that is causing the disk to be operated in non-buffered or synchronous mode that Windows and Linux are doing but FreeBSD isn't?
 
Is there possibly some setting for the motherboard that is causing the disk to be operated in non-buffered or synchronous mode that Windows and Linux are doing but FreeBSD isn't?
Check your dmesg output for hints about that, but I doubt about:
Code:
dmesg | grep ada0
What I have seen sometimes is that some disk connect at 3 GB/s instead of 6 GB/s, but that would be irrelevant here, performance wyse.
 
you could also perform a test (because you have at least one Linux system available), by booting Linux on the same motherboard, and checking the disks with
Code:
hdparm -tT /dev/sda # linux boot disk
hdparm -tT /dev/sdb  # FreeBSD/Seagate disk
 
Check your dmesg output for hints about that, but I doubt about:
Code:
dmesg | grep ada0
What I have seen sometimes is that some disk connect at 3 GB/s instead of 6 GB/s, but that would be irrelevant here, performance wyse.

Code:
dmesg | grep ada0

ada0 at ahcich2 bus 0 scbus2 target 0 lun 0
ada0: <ST4000DM000-1F2168 CC52> ATA8-ACS SATA 3.x device
ada0: Serial Number S300Y252
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 3815447MB (7814037168 512 byte sectors: 16H 63S/T 16383C)
ada0: quirks=0x1<4K>
ada0: Previously was known as ad8
ada0 at ahcich2 bus 0 scbus2 target 0 lun 0
ada0: <ST4000DM000-1F2168 CC52> ATA8-ACS SATA 3.x device
ada0: Serial Number S300Y252
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 3815447MB (7814037168 512 byte sectors: 16H 63S/T 16383C)
ada0: quirks=0x1<4K>
ada0: Previously was known as ad8
ada0 at ahcich2 bus 0 scbus2 target 0 lun 0
ada0: <ST4000DM000-1F2168 CC52> ATA8-ACS SATA 3.x device
ada0: Serial Number S300Y252
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 3815447MB (7814037168 512 byte sectors: 16H 63S/T 16383C)
ada0: quirks=0x1<4K>
ada0: Previously was known as ad8
[FONT=Consolas][/FONT]
 
you could also perform a test (because you have at least one Linux system available), by booting Linux on the same motherboard, and checking the disks with
Code:
hdparm -tT /dev/sda # linux boot disk
hdparm -tT /dev/sdb  # FreeBSD/Seagate disk

Thank you for all your replies.

It has been a long time since I had the bootable Linux system I used to test this system. I will see about setting one up tonight after the zpool test is done later tonight/early tomorrow.
 
Back
Top