|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
DD is messing with my mind ?
....
This has been the strangest thing to me for a very long time. I use to read that the beginning of a hard disk drive was the fastest section of the HDD and that the inner drive was the slowest because the arm has to work so much harder. I really don't see it that way but that's what the INTERNET say, including my old textbook. Anyway, if this is true than why every time I always get these same results. I do this with Arch_Live CD or from an EXTENDED install of Arch living on partition-5... It takes care of my FreeBSD and PcBSD installs. I use it for doing backups and clean-ups. It maybe useless but it's a habit to zero-out each partition before giving it his OS back. This is what I get every time (give or take a few sec/min): dd if=/dev/zero of=/dev/sda1 - - than sda2 - - than sda3 Partition-1 107 479 701 504 bytes | 100 GB - 4445 second | byte = 1 hour 15 minute Partition-2 107 479 733 760 bytes | 100 GB - 1118 second | byte = 0 hour 18 minute Partition-3 322 430 814 720 bytes | 300 GB - 3537 second | byte = 0 hour 59 minute It takes over an hour on P1 to do the same job of the same size on P2. It only takes minutes on P2 ... Even P3 triple in size is fastest than P1 ... and this never fail on my Seagate 1000GB, and I have notice the same on other brands of HDD's in the pass. It drives me crazy. There, I finally asked somebody. Thanks in advance |
|
|||
Quote:
Maybe this can help to explain my question a little better. Please take a look at the attached chart below. It is one of the many re-used charts that points no where and never speak of direction. 1) Where is this so-called outermost partition on the chart? 2) Is the innermost of the hard-drive located where the big hole (center gray circle) starts from? 3) If so, do this mean that the purple and green parts is the outermost of the hard-drive? 4) When you create partitions in this order (1 2 3 4). Do it turn-into (4 3 2 1) or (2 4 3 1) with-out your knowledge or is it like stacking ABC blocks as one would imagine? .... .... Take a look at my list again. This is the way I created my partitions; I used Arch-Live CD cfdisk. Could you or someone please explain to me and/or mark the chart attached below and re-post it to indicate an idea of where each partition actually lives (by it number). Can you mark the the inner and outer parts to indicate where they are on a real hard-drive. Can you point the in which partitons are actually created ... and than an answer to my original question if possible? Partition-1 100 GB - 4445 second | byte = 1 hour 15 minute Partition-2 100 GB - 1118 second | byte = 0 hour 18 minute Partition-3 300 GB - 3537 second | byte = 0 hour 59 minute Partition-4 EXTENDED is from 501MB -1000MB -- nothing on it yet. .... .... Last edited by sharris; 13th June 2011 at 07:07 AM. |
|
|||
Bashrules means that you (or the software) may have created your slices as 1 > 3 > 2 in that order. Check the output of fdisk, i.e. the starting and ending sectors/blocks of each slice.
__________________
May the source be with you! |
|
|||
How do I do that? Do I need to post the FreeBSD system-install numbers that has all the block information for all three dirives... They are all UFS partitions and are dual-boot to run any of the three BSD OS.
I'll get thim right now, give me a minute to write thime out. I think I got a copy somewhere. |
|
|||
__________________
May the source be with you! |
|
|||
see the gPart attachment below:
Don't forget to fill in the chart for those who have an idea somewhere down the line. 50 year latter is ok also. It will help a lot.
Thanks Quote:
Quote:
My PARTITIONS (not slices) are clean (no crud) and in the order that I posted. Than I add each OS in this order. Code:
Partition 1 1000GB -- FreeBSD 9.0 Partition 2 1000GB -- PcBSD 9.0 Partition 3 3000GB -- PcBSD 8.2 Partition 4 Arch-LINUX and storage FreeBSD Disklabel Editor: Disk:ad4 - Partition name: ad4s1 - Free: 6145292 blocks - (3000MB) Disk:ad4 - Partition name: ad4s2 - Free: 4918665 blocks - (2401MB) Disk:ad4 - Partition name: ad4s3 - Free: 6156261 blocks - (3005MB) Please don't question about the free-space above it's just something I was playing with yesterday. Let me give you the whole picture in less words as possible. (but impossible for me to do) 1. I got 3 BSD on one hard-drive which is uncommon, right. 2. I got a 500MB extended partition with Arch running GRUB and for plenty of room storing my backups, my way. 3. After I got my dream setup (wallpaper, bash_color, programs installed) for all my BSD's (not in VM's) I boot to ARCH-LINUX and dd-gzip each at will and save them to extended-partition-somewhere_xx. 4. Than I dd (zero-out) the partition my back-up was save from ... (ONE AT A TIME) if=/dev/zero of=/dev/sda1 2 and 3 ... and I keep a list of how long it take for dd to do its job for each of the three PARTITIONS. It's a habit. Now I know it is CLEAN. I don't pile a clean-copy of an partuions back on to of the old one. Something might slip-in or is it useless ... big deal, this is how I do things, even for your machine. 5. Now I restore each back-up (one at a time) and I record that too which is usually the same amount of time ... that is so great. Now I know what I am in for during time of emergency or fixing my customer machine (THEY LOVE ME). Nothing is better than have a COPY of the full partition just in case your last dump caught a bug. I do this very often for many of my customers so it's second nature to me. According to google I can't find the original thread that showed me how-to do this thing anymore. It been years. I guest just like Windows every one want to be the only OS on a giant partition (non-split to share with others) running VM's in his world only. I don't know what to guest anymore. This is like CRAZY Man and it's not a no big deal to setup! Disk-Destroyer (dd) don't care, that's why there is no excuse for this and it only proves that the inner part of a HDD is faster than the outer. Maybe the expert HDD maker never tried it this way. They test the whole drive and not partitions so they had the chance to learn their own stuff. You be surprise what even Bill Gates don't know about Apple and visa versa. They teach us all to do everything by the book so that you never learn jack sh*t else, including ALL BSD, execpt netBSD maybe. I hope someone will try it and provide the correct answers to all my questions. I need answers to prove these speeds cmp's wrong or a one-line correction in every textbook in the world! Tell me what you need and I'll lay it out for you. I think I am correct to say inner drive is the fastest, EVER! I hope you can help me to find to truth |
|
|||
Quote:
Hey bashrules, I just re-read my post. I hope you don't think I'm being sarcastic. These are questions to the ENTIRE world. I need to know what's up with this speed thing. It can easily be duplication by anyone who has a spare machine, love computing or has academic concerns. It's not about us and it could have an life of it's own if it even comes close to true. If it was not for your question I could not had made my question any clearer and it would have gone into the google pile of most important un-answers questions for another decade. Who would have thought it would take UNIX and ARCH working together to bring out the TRUTH. Maybe I'm wrong but how would I know I don't ask. Thanks a ton |
|
|||
Quote:
Quote:
Quote:
Bashrules' observation still holds.
__________________
May the source be with you! |
|
||||
Quote:
Quote:
I had no sleep myself, but with this tip and Bashrules' quick note I think there something good that I can added. By right it should take me days but I'll do my best over night. You can fill in the missing pieces and lock it down once and for all. Thank you so much. See you guys during regular hours Quote:
.... .... jggimi, I think I heard something like that before. It really get down to the hardware and bytes, like dumping the OS and running off on it's own, FOR-REAL. That's what I think dd really do, and now I think I see the light of the speed difference if some one know tell me the true rule of inner and outer. The most important part of the question that may solve all. Quote:
Thanks Last edited by sharris; 13th June 2011 at 06:22 PM. |
|
|||
Quote:
Hmm, that doesn't seem to be an issue with FreeBSD. |
|
|||
^ I was just doing a quick search to find that page.
Quote:
Code:
Standard MBR: [ S1 ][ S2 ][ S3 ][ S4 ] BSD labels: [P1|P2|P3 ][P1|P2|P3|P4|P5 ][P1 |P2 ][P1|P2|P3 |P4 ] Same thing for partitions. Within S1, P1 will be faster than P2, etc. Logically, P1 within S1 will be faster than P1 within S2, and so on. Quote:
Inner: situated farther in; being near a center.
__________________
May the source be with you! |
|
|||
I see there has been a lot of visitor to this thread so I removed the fun part just in case someone mom got a tracker on my system.
Notice how the ARM sit's at the center during initiation. This indicates to me that the MBR is at the CENTER of the HDD living on top of the hard-disk controller... I am the hole in your round HDD ^^^^^^^^^^^^^^^^^^^ I am the hard-Disk-Controller ^^^^^^^^^^^^^^^^^^^ I am the MBR ^^^^^^^^^^^^^^^^^^^ I am EXTENDED 4 ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 3 ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 2 ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 1 ^^^^^^^^^^^^^^^^^^^ Now lets look at it the other way around and maybe somebody, someday can tell us which way is UP! Also image that the MBR is at first 1024byte - Most OUTER limit of the HDD in both cases. I am the hole in your round HDD ^^^^^^^^^^^^^^^^^^^ I am the Hard-Disk controler ^^^^^^^^^^^^^^^^^^^ I am the MBR ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 1 ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 2 ^^^^^^^^^^^^^^^^^^^ I am PRIMARY 3 ^^^^^^^^^^^^^^^^^^^ I am EXTENDED 4 ^^^^^^^^^^^^^^^^^^^ If the MBR lives at bottom I go with the blue line-up... If the MBR lives at the top, I go with the red partitions line-up. This is because I just remember ... if you create p1 and p2 of the exact same size, p2 will ALWAYS read large, and by over 1mb if I remeber correctly. THIS IS PROOF that p1 has the MBR code at the beginning of itself. I have been told this in many books. so it's back to where partitions build accually begins... top-down or bottoms-up! The youTUBE link looks like bottoms up to a point. I'll buy a clear drive some day and watch it for myself. That's the only way learn. I'll use camera's if I have to. back to the drawing board Back to the image you get when using Partition-Commander.. it's the RED view or is it just an imaginary view to make it human understandable? Whatever, P2 and P3 proved FASTER where ever they may be and we know for a fact that p3 got to be somewhere in the middle (based on size given) of the HDD, so the OUTER being known as the fastest, don't hold water. Maybe the BLUE chart line-up would allow for the OUTER drive to be known as the fastest if we consider that. Other than that, bottom-line: BYTES are BYTES no matter what's inside or where any group of them are located ... P3 Win! We wait an confirmation. Please hook up that spare machine. Thanks ... ... Last edited by sharris; 20th June 2011 at 08:51 AM. |
|
|||
FINALLY
I forgot to tell you guys where I stole that chart from and I did not even bother to read the darn wiki. All I wanted was a pie-chart that looks like a HDD. Now I read the wiki and it's links and it say nothing more about an HDD or LINUX ...
Quote:
Quote:
blue-chart .. from bottoms-up, this would make the OUTER partition-faster. It's was all about the order partitions are created in, and the fact that the tech-people were too cool in the way they describe the OUTER section of the HDD, never including in English "from the INNER sections". Not many textbook had much to go on, so no additions comments were ever made. Kind of make since. I don't know what to believe anymore. http://en.wikipedia.org/wiki/Pie_chart#cite_note-17 You can mark this thread solve when somebody prove it, than say-so. What a trip. |
|
|||
Quote:
Anyway, that proves it! Thanks Guys Yes, my dear Watson You can mark this 1998 case close |
|
||||
Quote:
For instance, you could use a little bit of "magic" that Gregory Smith wrote about in "PostgreSQL 9.0 - High Performance" (Chapter 3 - Database Hardware Benchmarking) called "zcav" (part of the bonnie++ suite of tools). http://www.coker.com.au/bonnie++/zcav/ The terms "first", "outer", etc... are pretty meaningless since what you're talking about is not a standard, per se, but rather a convention. It's entirely possible for a hard drive manufacturer to use the physical "inner" section of the platters as the "first" sectors of the drive, though by convention it's usually the opposite since the physical "outer" section of the platters is denser and reads faster. (I'd bet that even though it's "convention", most if not all hard drive manufacturers would use the "outer" sections as "first" given the performance characteristics.) I ran into the same "abstraction" issue when I asked the question "if a cpu instruction is a string of 1's and 0's, what physically happens when said 1's and 0's are "run" on a given processor? In other words, what circuits are turned on and off by a given instruction? There is no answer, because the question is asked on a logical level and not an implementation level (and it's unlikely that Intel is going to hand over the docs to explain how their CPU's work on that detailed of a level, and it's unlikely I'd understand it even if they did). The same question, when researched in terms of MIPS, got the answer "it's implementation-dependent". Well, yeah, obviously...same goes for hard drives. So there's only one thing left to do...test it on a logical level (all of this done on my OpenBSD-CURRENT workstation): Code:
# pkg_add bonnie++ gnuplot # df -h Filesystem Size Used Avail Capacity Mounted on /dev/wd0a 1005M 105M 850M 11% / /dev/wd0m 412G 93.6G 298G 24% /home /dev/wd0d 3.9G 54.0K 3.7G 0% /tmp /dev/wd0f 2.0G 565M 1.3G 30% /usr /dev/wd0g 1005M 180M 775M 19% /usr/X11R6 /dev/wd0h 9.8G 3.4G 6.0G 36% /usr/local /dev/wd0j 2.0G 4.1M 1.9G 0% /usr/obj /dev/wd0k 9.8G 315M 9.0G 3% /usr/ports /dev/wd0i 2.0G 811M 1.1G 42% /usr/src /dev/wd0l 3.9G 518M 3.2G 14% /usr/xenocara /dev/wd0e 10.8G 25.3M 10.2G 0% /var # for slice in a d e f g h i j k l m c; do zcav /dev/rwd0$slice > rwd0$slice.zcav; done Code:
unset autoscale x set autoscale xmax unset autoscale y set autoscale ymax set xlabel "Position GB" set ylabel "KB/s" set key right bottom set title "Seagate Barracuda ST3500418AS" plot "rwd0c.zcav" title "rwd0c" replot "rwd0a.zcav" title "rwd0a" replot "rwd0d.zcav" title "rwd0d" replot "rwd0e.zcav" title "rwd0e" replot "rwd0f.zcav" title "rwd0f" replot "rwd0g.zcav" title "rwd0g" replot "rwd0h.zcav" title "rwd0h" replot "rwd0i.zcav" title "rwd0i" replot "rwd0j.zcav" title "rwd0j" replot "rwd0k.zcav" title "rwd0k" replot "rwd0l.zcav" title "rwd0l" set terminal png set output "rwd0c-zcav.png" replot "rwd0m.zcav" title "rwd0m" I'd be interested to see if you could correlate the partitions to drive zones. Edit - I tried this with a RAID 1 of 73 GB 15k SAS drives that have a default Ubuntu install on them, and it was very easy to see that the sdc5 swap partition was on the slowest part of the "end" of the disk.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice. Last edited by rocket357; 14th June 2011 at 06:37 PM. |
|
||||
Hi sharris,
I always like your posts, they make me think ; ) I too have always understood the inner portion of the disk to be the fastest on a mechanical level because the arm does not have to do as much physical seeking, and it is less wear etc. Although maybe not so true anymore, I've always followed those guidelines. As rocket357 pointed out however, it's possible that things are entirely implementation-specific. Interesting......... |
|
||||
Quote:
Quote:
I could be wrong, but that's how I'd approach it. * - The circumference of a given "track" on a platter grows as you move further from the center. This means 2 things: 1) The relative speed the head "moves" across the platter is greater (further to "travel" as tracks get larger towards the outermost tracks), and 2) each "track" has more distance to it as you near the outermost tracks, so outer tracks can contain more sectors (i.e. more data). Faster linear speed + more data = faster data rates.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice. Last edited by rocket357; 15th June 2011 at 04:14 AM. |
|
|||||
Quote:
The first X sectors are located in the very first track which is, as you've already said it ("data saving begin at the first OUTER edge of the HDD"), on the periphery of the platter. And I presume it's wrong. Quote:
To preserve backward compatibility, partitions (the "BSD slice" ones) are aligned to cylinder boundaries. Most of the time, this wastes hundreds/thousands of sectors, i.e. couple of MB, between slices and at the end of the disk. Quote:
Quote:
Quote:
Data is written on sectors from the outer tracks to the inner ones. Partitions/BSD slices (as well as logical or BSD partitions) are linear and also start from the outer tracks and move in to the inner ones. The data transfer rate is higher in the outer cylinders compared to the inner ones because they contain more sectors. Period. Search the Internet for "zone bit recording".
__________________
May the source be with you! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
where are start up settings on KDE Never mind i found them | whispersGhost | Solaris | 2 | 12th June 2008 09:30 PM |