An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
SSD v HDD directory size
#36652 10/25/15 01:11 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #36678 10/26/15 12:31 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: SSD v HDD directory size
Virtual1 #36698 10/27/15 05:26 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #36705 10/27/15 01:24 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: SSD v HDD directory size
Virtual1 #36720 10/27/15 10:24 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #36722 10/27/15 10:56 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
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.


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: SSD v HDD directory size
joemikeb #36731 10/28/15 07:01 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #36736 10/28/15 11:59 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: SSD v HDD directory size
Virtual1 #36750 10/28/15 03:20 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
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


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: SSD v HDD directory size
joemikeb #36758 10/28/15 05:56 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: SSD v HDD directory size
joemikeb #38335 01/17/16 12:48 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #38360 01/19/16 02:00 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: SSD v HDD directory size
Virtual1 #38361 01/19/16 03:59 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
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.

Last edited by joemikeb; 01/19/16 04:03 PM.

If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: SSD v HDD directory size
joemikeb #38362 01/19/16 04:49 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #38364 01/19/16 06:24 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
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.

Last edited by joemikeb; 01/19/16 08:17 PM. Reason: ^$*#^@ SPELL CHECK

If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein
Re: SSD v HDD directory size
joemikeb #38366 01/20/16 08:12 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
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
Re: SSD v HDD directory size
artie505 #38367 01/20/16 03:34 PM
Joined: Aug 2009
Likes: 16
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 16
I apparently can't make sense of my own meanderings blush


If we knew what it was we were doing, it wouldn't be called research, would it?

— Albert Einstein

Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.062s Queries: 48 (0.046s) Memory: 0.6628 MB (Peak: 0.7920 MB) Data Comp: Zlib Server Time: 2024-03-28 13:53:44 UTC
Valid HTML 5 and Valid CSS