View Single Post
  #6   (View Single Post)  
Old 27th May 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default

You ignored the possibility of the 4K partition misalignment so I don't consider it solved

Code:
#  diskinfo -v ada0
ada0
        512             # sectorsize
        400088457216    # mediasize in bytes (372G)
        781422768       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        775221          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        S0NFJDWQ304886  # Disk ident.
If your 'slow' disk reports a sector size of 4096 and if that partition p is not aligned on a 4K boundary it will have a negative impact on disk performance.

From https://en.wikipedia.org/wiki/Advanced_Format :

Quote:
The translation process is more complicated when writing data that is either not a multiple of 4K or not aligned to a 4K boundary. In these instances, the hard drive must read the entire 4,096-byte sector containing the targeted data into internal memory, integrate the new data into the previously existing data and then rewrite the entire 4,096-byte sector onto the disk media. This operation, known as read-modify-write (RMW), can require additional revolution of the magnetic disks, resulting in a perceptible performance impact to the system user. Performance analysis conducted by IDEMA and the hard drive vendors indicates that approximately five to ten percent of all write operations in a typical business PC user environment may be misaligned and a RMW performance penalty incurred.
That is why I asked for the output of diskinfo(8) and gpart(8)

Although not needed for this particular disk because it does not have 4K disk sectors, I aligned the first partition on a 63 x 8 = 504 sectors boundary.

Code:
 # gpart show
=>       63  625142385  ada0  MBR  (298G)
         63        441        - free -  (220k)
        504   20971440     1  freebsd  (10G)
   20971944   83885760     2  !166  (40G)
  104857704  520284744     3  freebsd  [active]  (248G)
So please check the disk sector size and partition alignment
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote