An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#36652 - 10/24/15 06:11 PM SSD v HDD directory size
artie505 Online


Registered: 08/04/09
The fact that data is apparently so scattered on an SSD that it's unrecoverable even without suffering a secure erase has gotten me wondering about the relative sizes of the directories of a volume on an SSD and a clone of the same volume on an HDD.

Can somebody please post the appropriate Terminal command(s)?

Thanks.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#36678 - 10/26/15 05:31 AM Re: SSD v HDD directory size [Re: artie505]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
To the best of my knowledge, no operating system customizes/optimizes its file system format when using an SSD, so I would not expect a difference there.

Wear leveling is usually handled by the hard drive's onboard controllers, because only it has a true understanding of what specific tricks will help reduce wear and the location that wear is building up at. So as far as the computer is concerned, this is handled totally transparently.

Also regarding "sizes of directories", I'm not sure I understand what you mean.

Code:
ls -la

drwx------+  7 virtual1  staff        238 Oct 23 11:47 Desktop
drwx------+ 22 virtual1  staff        748 Jul 31 15:09 Dock
drwx------+ 15 virtual1  staff        510 Aug 26 14:35 Documents

the column left of the date is the "size" of the directory, in bytes iirc. It usually goes up around 38 per entry. This is useful for finding directories with very large numbers of files in them. (like some log folders that are runaway)
_________________________
I work for the Department of Redundancy Department

Top
#36698 - 10/26/15 10:26 PM Re: SSD v HDD directory size [Re: Virtual1]
artie505 Online


Registered: 08/04/09
I may be off on a wild goose chase.

I was thinking that because the data on an SSD is so scattered/fragmented as compared to that on an HDD, the SSD's directory (that we erase in a simple erase procedure) for a volume must contain much more information than the directory for the same volume cloned to an HDD.

Guess not?
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#36705 - 10/27/15 06:24 AM Re: SSD v HDD directory size [Re: artie505]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
Originally Posted By: artie505
I may be off on a wild goose chase.

I was thinking that because the data on an SSD is so scattered/fragmented as compared to that on an HDD, the SSD's directory (that we erase in a simple erase procedure) for a volume must contain much more information than the directory for the same volume cloned to an HDD.

Guess not?

To the best of my knowledge, no current FS changes file or directory layout in response to media type being SSD. It would make some sense though, since fragmentation isn't a problem.

Example: when you are appending to say, a text document of a book you are writing. Every so often it either auto saves or you save manually, increasing the file's size. Since the computer's been busy doing other things, it's already written stuff off to the hard drive right after the end of the file. So it has to allocate blocks somewhere else, away from the rest of the document. After doing this several times, (mac os says 8 fragments iirc) the OS says "ok we need to pick this up" and the next save will be entirely moved to a different spot on the hdd where the entire file fits in one continuous chunk. This prevents multiple head seeks to read the file.

An SSD would not require this at any time.

The same problem can apply with a directory, which is also stored as something like a file. Adding files to a directory requires the directory to expand its size, and possibly occupy non-contiguous clusters. After a certain point, the OS will usually "gather and move" it, to defragment it. I don't know if OS X still tries to do this sort of thing on SSDs or not. But if it did, it would be a waste of time.

So the result is that if it doesn't do it, it doesn't help. If it DOES do it, it still doesn't help. So there's nothing to be fixed when copying FROM ssd TO hdd. Going in the other direction however, would benefit the hdd to be defragged. But that's done as a part of the copy process anyway since the copy is linear from one file/folder to another, not random, which is what causes fragmentation. So there's nothing additional that anyone needs to do, it's already doing what it should.

_________________________
I work for the Department of Redundancy Department

Top
#36720 - 10/27/15 03:24 PM Re: SSD v HDD directory size [Re: Virtual1]
artie505 Online


Registered: 08/04/09
Whew! This is getting complicateder and complicateder.

Thanks for helping to uncomplicate it a bit.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#36722 - 10/27/15 03:56 PM Re: SSD v HDD directory size [Re: artie505]
joemikeb Online

Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Artie you might find this Wikipedia article on HFS+ interesting as it discusses not only the history but also the structure of the Mac OS Extended volume and directory structure. Whether that will contribute to making things more or less complicated for you is another question — one that I am unequipped to answer.

I will point out the article ends with Lion (OS X 10.7) but Mac OS Extended is pretty dynamic and there are modifications and new data incorporated into the file system with virtually every release of OS X so the article is not entirely current.

If you want to really dig into the technical depths of Mac OS Extended structure take a look at this tutorial and plan to spend some time with it.
_________________________
joemikeb • moderator

Top
#36731 - 10/28/15 12:01 AM Re: SSD v HDD directory size [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Thanks for the links.

I've given the Wikipedia article a quick look, and it seems to be digestible, so I'll spend more time with it and hopefully learn something.

Your tutorial, on the other hand, looks like it's beyond both my technical competence and desire therefor. Thanks, though.
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#36736 - 10/28/15 04:59 AM Re: SSD v HDD directory size [Re: artie505]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
Originally Posted By: artie505
I've given the Wikipedia article a quick look, and it seems to be digestible, so I'll spend more time with it and hopefully learn something.

I'm quite certain if you get into enough detail to be able to follow along from the boot block to a file, you will get an ulcer.

(HFS is second only to ZFS in filesystem complexity)
_________________________
I work for the Department of Redundancy Department

Top
#36750 - 10/28/15 08:20 AM Re: SSD v HDD directory size [Re: Virtual1]
joemikeb Online

Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Originally Posted By: Virtual1

I'm quite certain if you get into enough detail to be able to follow along from the boot block to a file, you will get an ulcer.

(HFS is second only to ZFS in filesystem complexity)

Are you quite certain HFS+ is second in complexity? That may be arguable. laugh
_________________________
joemikeb • moderator

Top
#36758 - 10/28/15 10:56 AM Re: SSD v HDD directory size [Re: joemikeb]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
Originally Posted By: joemikeb
Originally Posted By: Virtual1

I'm quite certain if you get into enough detail to be able to follow along from the boot block to a file, you will get an ulcer.

(HFS is second only to ZFS in filesystem complexity)

Are you quite certain HFS+ is second in complexity? That may be arguable. laugh

Take HFS and add things like volumes that span drives, even over the network, super flexible automatic raiding across completely dissimilar media types, and the madness that is media pools. then you're closer to having an idea of what ZFS is.
_________________________
I work for the Department of Redundancy Department

Top
#38335 - 01/16/16 04:48 PM Re: SSD v HDD directory size [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Originally Posted By: joemikeb
Artie you might find this Wikipedia article on HFS+ interesting as it discusses not only the history but also the structure of the Mac OS Extended volume and directory structure.

I finally got to reading the article, and I was actually able to absorb some of its content...no matter that it's nowhere near up to date.

Thanks for the link. smile
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#38360 - 01/19/16 06:00 AM Re: SSD v HDD directory size [Re: artie505]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
I tried to make a disk editor awhile back, remembering how I used to be able to swing along the vines like tarzan, from the volume header all the way to files, in HFS. Then came HFS+, and that became substantially more difficult to do. (it's documented, but isn't anywhere near as clear)
_________________________
I work for the Department of Redundancy Department

Top
#38361 - 01/19/16 07:59 AM Re: SSD v HDD directory size [Re: Virtual1]
joemikeb Online

Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Originally Posted By: Virtual1
I tried to make a disk editor awhile back, remembering how I used to be able to swing along the vines like tarzan, from the volume header all the way to files, in HFS. Then came HFS+, and that became substantially more difficult to do. (it's documented, but isn't anywhere near as clear)

Not to worry, I am quite confident that as soon as you get close to understanding HFS+ Apple will add another feature to further increase the complexity and diminish the clarity.
grin

I am reminded that when I was teaching at the graduate level we used to encourage (or was that discourage?) the students by frequently reminding them the half life of information in computing was roughly 4 years. I don't know of any reason to believe that has gotten shorter, rather the contrary.


Edited by joemikeb (01/19/16 08:03 AM)
_________________________
joemikeb • moderator

Top
#38362 - 01/19/16 08:49 AM Re: SSD v HDD directory size [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Quote:
...the half life of information in computing was roughly 4 years. I don't know of any reason to believe that has gotten shorter, rather the contrary.

Don't you mean longer?
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#38364 - 01/19/16 10:24 AM Re: SSD v HDD directory size [Re: artie505]
joemikeb Online

Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
Originally Posted By: artie505
Quote:
...the half life of information in computing was roughly 4 years. I don't know of any reason to believe that has gotten shorter, rather the contrary.

Don't you mean longer?

Half life refers to the length of time…
  • …taken for the radioactivity of a specified isotope to fall to ½ of its original value
  • …required for any specified property (e.g., the concentration of a substance in the body) to decrease by half
  • …for ½ of the knowledge gained to become obsolete.

Since the rate of advancement and change in computer science is accelerating at an increasing rate, the half life of information in the field is getting shorter. In other words where the half-life of information in the field of computing was 4 years it is now more-like 3½ or even 3 years. The human solutions for that are generally…
  • increasing specialization (learning more and more about less and less)
  • Taking a broader less detailed approach
  • Going back to school or training every 5 to 10 years
  • Going into another field of endeavor that does not advace as rapidly
  • going into management

If this discussion is to be continued, it should go into the lounge.


Edited by joemikeb (01/19/16 12:17 PM)
Edit Reason: ^$*#^@ SPELL CHECK
_________________________
joemikeb • moderator

Top
#38366 - 01/20/16 12:12 AM Re: SSD v HDD directory size [Re: joemikeb]
artie505 Online


Registered: 08/04/09
Responding here because it directly pertains to this thread.

Originally Posted By: joemikeb
Originally Posted By: artie505
Originally Posted By: joemikeb
...the half life of information in computing was roughly 4 years. I don't know of any reason to believe that has gotten shorter, rather the contrary.

Don't you mean longer?

Since the rate of advancement and change in computer science is accelerating at an increasing rate, the half life of information in the field is getting shorter.

As I said, there's no reason to believe that it has gotten longer. wink
_________________________
The new Great Equalizer is the SEND button.

In Memory Of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Top
#38367 - 01/20/16 07:34 AM Re: SSD v HDD directory size [Re: artie505]
joemikeb Online

Moderator

Registered: 08/04/09
Loc: Fort Worth, Texas
I apparently can't make sense of my own meanderings blush
_________________________
joemikeb • moderator

Top

Moderator:  alternaut, dkmarsh, joemikeb