LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-15-2011, 09:24 AM   #1
lexa_
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Rep: Reputation: Disabled
Filesystem reduces the speed of the disc (not 4kb sector size problem)


I bought new hdd (WD2002FAEX-007BA0). This disk have normal block size (512bytes) so I do not bother with the alignment.
I trying make test write speed.
Code:
dd if=/dev/zero of=/dev/sda oflag=direct bs=16384 count=100000
100000+0 records in
100000+0 records out
1638400000 bytes (1.6 GB) copied, 15.4601 s, 106 MB/s
Now i'm creating one partition, format it in ext2, and test write speed again:
Code:
dd if=/dev/zero of=/mnt/new_disk/bigfile.big oflag=direct bs=16384 count=100000
100000+0 records in
100000+0 records out
1638400000 bytes (1.6 GB) copied, 24.1532 s, 67.8 MB/s
This means that ext3 has reduced the recording speed to drive at 40MB/s. I tried other file systems(reiser, xfs) but result was very similar.

Does it normal? How can i speed up my disk?

hdparm -I
Code:
/dev/sda:

ATA device, with non-removable media
        Model Number:       WDC WD2002FAEX-007BA0                   
        Serial Number:      WD-WMAY01023094
        Firmware Revision:  05.01D05
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5 
        Likely used: 8
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63
        --
        CHS current addressable sectors:   16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors: 3907029168
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:     1907729 MBytes
        device size with M = 1000*1000:     2000398 MBytes (2000 GB)
        cache/buffer size  = unknown
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Recommended acoustic management value: 128, current value: 254
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    NOP cmd
           *    DOWNLOAD_MICROCODE
                Power-Up In Standby feature set
           *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
                Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    64-bit World wide name
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Gen3 signaling speed (6.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
           *    DMA Setup Auto-Activate optimization
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Long Sector Access (AC1)
           *    SCT LBA Segment Access (AC2)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        288min for SECURITY ERASE UNIT. 288min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee0ad3e247b
        NAA             : 5
        IEEE OUI        : 0014ee
        Unique ID       : 0ad3e247b
Checksum: correct

Last edited by lexa_; 07-16-2011 at 12:00 PM. Reason: make topic more relevant
 
Old 07-16-2011, 08:17 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Welcome to LQ!

Look at this article for 'Linux and 4K disk sectors';
Quote:
During the transition phase (step 2), drives are planned to use 512 byte emulation, known as read-modify write (RMW). Read-modify-write is a technique used to emulate 512-byte sector size over a 4K physical sector size. Written data which does not correspond to full 4K sectors would result in the drive first reading the existing 4K sector, modifying the part of data which changed, and writing the 4K sector data back to the drive. More information on RMW and its implementation can be found in this set of slides. Needless to say, RMW decreases the throughput of the device, though the shorter ECC will compensate by giving an overall better performance (hopefully). Such drives are expected to be commercially available in the first quarter of 2011.
Matthew Wilcox recently posted a patch to support 4K sectors according to the ATA-8 standard (PDF). The patch adds an interface function by the name sector_size_supported(). Individual drivers are required to implement this function and return the sector size used by the hardware. The size returned is stored in the sect_size field of the ata_device structure. This function returns 512 if the device does not recognize the ATA-8 command, or the driver does not implement the interface. The sect_size is used instead of ATA_SECT_SIZE when the data transfer is a multiple of 512-byte sectors.
Linux File System has several good reference links to help clear things up for filesystems.
 
Old 07-16-2011, 08:36 AM   #3
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
I'm a little confused with that post. Which file system got 106 MB/s?

BTW, you were testing the same sectors, right?

Quote:
Originally Posted by onebuck View Post
Look at this article for 'Linux and 4K disk sectors';
WD2002FAEX is not an 'advanced format' drive (aka '4k sectors pretending to by 512b sectors').
 
Old 07-16-2011, 11:41 AM   #4
lexa_
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cascade9 View Post
I'm a little confused with that post. Which file system got 106 MB/s?
I've got 106 Mb/s when write directly on unformatted disk (sda) and 60MB/s if write on filesystem on same disk.

this disk have 512b sector size.
Code:
>> hdparm -I /dev/sda | grep 'Sector size'             
        Logical/Physical Sector size:           512 bytes
 
Old 07-16-2011, 10:09 PM   #5
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Quote:
Originally Posted by lexa_ View Post
I've got 106 Mb/s when write directly on unformatted disk (sda) and 60MB/s if write on filesystem on same disk.
Testing unformatted would be testign sector 1, which sector is testing with a formatted disc will depend on where the partition is.

The further toward the 'end' of the drive, the slower the speed will be. So its possible that your 'slower' result is totally normal.

Quote:
Originally Posted by lexa_ View Post
this disk have 512b sector size.
Code:
>> hdparm -I /dev/sda | grep 'Sector size'             
        Logical/Physical Sector size:           512 bytes
That doesnt actually show that you disc has 512b sectors.

Quote:
/dev/sdb:

ATA device, with non-removable media
Model Number: WDC WD10EARS-00Y5B1
Serial Number: WD-WCAV5C729344
Firmware Revision: 80.00A80
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 1953525168
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
cache/buffer size = unknown
WD EARS discs are 'advanced format' drives, and as you can see they still report 512b sector size.
 
Old 07-17-2011, 02:01 AM   #6
lexa_
LQ Newbie
 
Registered: Jul 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cascade9 View Post
Testing unformatted would be testign sector 1, which sector is testing with a formatted disc will depend on where the partition is.

The further toward the 'end' of the drive, the slower the speed will be. So its possible that your 'slower' result is totally normal.
I create partition begining from 2048 sector and test on very big files(500G) and i've got the same results. i belive test same sectors on disk.

Quote:
Originally Posted by cascade9 View Post
That doesnt actually show that you disc has 512b sectors.

WD EARS discs are 'advanced format' drives, and as you can see they still report 512b sector size.
How can i confidently know sector size?
According to WD website WD2002FAEX doesn't have advanced format http://www.wdc.com/global/products/s...899&language=1

Last edited by lexa_; 07-17-2011 at 02:02 AM. Reason: fix misspell
 
Old 07-17-2011, 07:38 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Quote:
Originally Posted by cascade9 View Post
I'm a little confused with that post. Which file system got 106 MB/s?

BTW, you were testing the same sectors, right?



WD2002FAEX is not an 'advanced format' drive (aka '4k sectors pretending to by 512b sectors').
My bad! I thought it was. Check the list again and your right. Thinking that drive series are advanced.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed difference between USB pendrive and hard disc....? resetreset Linux - Hardware 1 08-20-2008 08:29 PM
Application / Script to test READ speed on a filesystem BradRalston Linux - Software 1 05-10-2008 02:01 AM
LXer: New Linux flash filesystem offers 4X speed LXer Syndicated Linux News 0 01-25-2008 09:41 AM
How ext3 filesystem is organized in the disc? anindyanuri Linux - Software 2 03-02-2005 10:05 AM
Fedora Filesystem speed xml Linux - Software 11 01-03-2005 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration