LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-30-2012, 06:47 PM   #1
Crogge
LQ Newbie
 
Registered: Jun 2011
Location: Germany
Distribution: Debian
Posts: 10

Rep: Reputation: Disabled
Can I change the physical data position manually to increase the performance?


I look currently for a possibility to change the physical position of specific files/folders on my HDDs. The database folder of MySQL should be for example on the fast part of the HDD (Outside). The Server HDDs are connected to a 3ware hardware raid controller (Raid 1).

OS: Ubuntu LTS
 
Old 01-31-2012, 03:08 AM   #2
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 13
Hi!

I'm afraid you've a wrong imagine about physical storage. HDD has its own electronics and software that calculate physical data position and that is responsible for asymmetrical sectors layout on HDD plates. It is nearly impossible to change it in OS level.

see http://en.wikipedia.org/wiki/Disk_storage
http://en.wikipedia.org/wiki/Cylinder-head-sector
 
Old 01-31-2012, 10:54 PM   #3
Crogge
LQ Newbie
 
Registered: Jun 2011
Location: Germany
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MartinStrec View Post
Hi!

I'm afraid you've a wrong imagine about physical storage. HDD has its own electronics and software that calculate physical data position and that is responsible for asymmetrical sectors layout on HDD plates. It is nearly impossible to change it in OS level.

see http://en.wikipedia.org/wiki/Disk_storage
http://en.wikipedia.org/wiki/Cylinder-head-sector
Wrong, partitions are written by default on the "beginning" of the HDD which is the fast part outside of the HDD.
 
Old 02-01-2012, 07:14 AM   #4
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,268

Rep: Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086Reputation: 1086
Notwithstanding that comment, true though it might or might not be, (IMHO...) it simply doesn't matter in the end. Hard drives themselves often have very sophisticated electronics, including on-board caching and the ability to do asynchronous writes, and controller (cards) can be even smarter. Any "speed advantage" that you might imagine getting by virtue of the fact that your data is located 8cm instead of 4cm from the center of the platter are chimerical. Rotational delay is insignificant; seek-time is where you lose it.

Remember, CPUs operate in terms of nanoseconds, buses and so-forth in microseconds, and hard drives still require many milliseconds to do anything. Caches (both in the hardware and in Linux's own buffer pool) are where it's at.
 
Old 02-01-2012, 10:13 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,531
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The outside is the fastest for sustained transfer (when caches no longer help) but that is irrelevant if the actual activity occurs in small transfers. The middle is best to minimise seek times but that is irrelevant if the heads spend most of their time where the critical data is anyway.
 
Old 02-02-2012, 10:10 PM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,572

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
Quote:
Originally Posted by Crogge View Post
Wrong,
Obviously. I mean, the very existence of disk defragmenters disproves this.

Anyway, the solution seems pretty obvious to me. Wipe the drive, and restore the parts that need to go onto the fastest parts of the drive first. The disk controller will write that to the fastest part of the drive. Then continue with what needs to go to the next fastest part. And so on.

Setting up a partition at the front of the drive for fast data access should work too.

Last edited by dugan; 02-02-2012 at 10:19 PM.
 
Old 02-02-2012, 11:53 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,247

Rep: Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025Reputation: 2025
Personally I agree with sundialsvcs, I think the OP is being extremely optimistic.
I'd also like to see a citation for
Quote:
restore the parts that need to go onto the fastest parts of the drive first. The disk controller will write that to the fastest part of the drive
Quite frankly I doubt it is that predictable with modern tech, not forgetting the OP is using a RAID, not a single disk.

If I was the user, I would want to profile the performance to see where the actual bottleneck is.
Given we're talking an RDBMS based system, it's often the lack of or incorrect indexes in the DB that is the issue.

Last edited by chrism01; 02-05-2012 at 08:06 PM. Reason: code->quote
 
Old 02-03-2012, 12:18 AM   #8
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,572

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
Quote:
Originally Posted by chrism01 View Post
I'd also like to see a citation for
It's covered in Andrew Tanenbaum's "Modern Operating Systems". Due to the way hard drives work, it's obvious that all "modern tech" hard disks do indeed still work this way (except for SSDs, of course). The fact that it's a RAID does not change this; the RAID controller will start writing from the outside edges of each drive, then work its way inwards.

If by "citation" you just meant some pages where this information appears, here are some that showed up in a google search:

www.pcguide.com/ref/hdd/geom/tracks_ZBR.htm
http://www.passmark.com/support/perf...st_results.htm
http://forums.anandtech.com/showthread.php?t=415000
http://www.nvnews.net/vbulletin/showthread.php?t=165018

Now, that said:

Quote:
Given we're talking an RDBMS based system, it's often the lack of or incorrect indexes in the DB that is the issue.
This is probably actually the real problem.

Last edited by dugan; 02-03-2012 at 12:25 AM.
 
1 members found this post helpful.
Old 02-04-2012, 05:17 PM   #9
jefro
Guru
 
Registered: Mar 2008
Posts: 11,139

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
The outside may be relatively faster to the head in terms of mph or so. The problem is that the drive heads have to keep going back to the source to tell where the next block is. I think to save head movements since they are the slowest we now use the middle of the disk to hold partition and file location and apply data to both sides of the middle out. The stuff posted above is like it was 20 years ago.
 
Old 02-05-2012, 04:14 AM   #10
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I think sparse defragmenting would help more than worrying about the outside or the inside of the disk. XFS has such a defragmenter, I also wrote a script that can do it on filesystems that supports extents, it is on my site.
 
  


Reply

Tags
performance


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to increase physical memory sifaw_sdd Linux - Hardware 2 01-23-2011 10:54 AM
how can increase my physical volume group space in linux ilu_nishant Linux - Newbie 3 09-12-2009 01:41 PM
Can I increase the size of a physical volume in an lvm group? If so, how? MikeB23930 Fedora 2 07-21-2009 05:38 PM
increase free physical memory, decrease disk cache efm Linux - Hardware 4 03-30-2006 09:53 AM
Increase Performance berkay Fedora 10 08-23-2004 04:24 PM


All times are GMT -5. The time now is 08:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration