View previous topic :: View next topic |
Author |
Message |
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Sat Sep 11, 2021 7:29 pm Post subject: |
|
|
True, the drive microcontroller is the one that would track this. For better or worse, people have come to treat the microcontroller and its associated software as "firmware" and only consider software as software when it runs on a device we have some hope of reprogramming. Given that, my earlier post might be clearer if every reference to software was read as "the operating system controlling the user's computer" and references to hardware were "hardware/firmware". |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4147 Location: Bavaria
|
Posted: Sat Sep 11, 2021 10:01 pm Post subject: |
|
|
Goverp wrote: | [...] and also encryption, are Linux kernel features that any fs could support, though at the moment it's only ext4, f2fs and possibly another I'be forgotten. |
The third one is UBIFS.
Code: | File systems --->
CONFIG_FS_ENCRYPTION: │
│ │
│ Enable encryption of files and directories. This │
│ feature is similar to ecryptfs, but it is more memory │
│ efficient since it avoids caching the encrypted and │
│ decrypted pages in the page cache. Currently Ext4, │
│ F2FS and UBIFS make use of this feature. |
I use this for "fscrypt" on an ext4-partition. |
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 812
|
Posted: Sun Sep 12, 2021 6:46 am Post subject: |
|
|
eccerr0r wrote: | As a thought question, how much of the hardware should be exposed to the software?
Sounds like people don't want wear leveling details exposed to the software? |
Back in the days when SSD's were the new kid on the block of storage devices there was also the discussion if all the complexity should be done on the drives' controller. Just give the OS access to the raw flash devices so all the functions can be implemented in the kernel and as open source software. The implementation could be in a similar way as we have multiple IO schedulers, power governors, etc. so the user can choose which wear leveling/garbage collection algorithm fits the workload best. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 812
|
Posted: Sun Sep 12, 2021 6:51 am Post subject: |
|
|
Zucca wrote: |
Other features of f2fs are compression and checksumming of some sort. And it seems some level on encryption. It also supports multi-device fs at some level (max 8 device iirc).
|
Especially the last two sound to me like feature creep has hit F2FS ...
We have excellent block level implementations of those, I don't understand why "everybody" seems to want them on filesystem level (like btrfs, zfs, now f2fs). In my opinion these are not filesystem tasks. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3342 Location: Rasi, Finland
|
Posted: Sun Sep 12, 2021 9:54 am Post subject: |
|
|
pa4wdh wrote: | We have excellent block level implementations of those, I don't understand why "everybody" seems to want them on filesystem level (like btrfs, zfs, now f2fs). In my opinion these are not filesystem tasks. | There are benefits of this "non-UNIX" design in filesystems. What I've read about (and talked on #btrfs@Libera.Chat) btrfs is that it is quite beneficial for filesystem to know about the underlying block while at the same time handling the placement of files. That said, I think it can be splitted into two smaller processes. At least XFS is quite well aware if it's placed on top of mdraid, etc... Which is the setup I use on my server now.
I've used btrfs on many systems. It's very flexible, but slow. The only non-flexible thing with btrfs is that one cannot place swap file on multi-device btrfs.
Oh well. I'm about to derail into the off-topic area, so I'll stop now. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Tue Sep 28, 2021 4:53 pm Post subject: |
|
|
Been away for a while, but as far as a few questions go, I may have the answers. F2FS supports compression because it further reduces writes. It explains this in the documentation. Compression is not "scope-creep", it is something which was just not there in the beginning. Also, the argument for using F2FS on dumb devices (devices without an FTL) was due to many early devices not doing wear-leveling and such, which F2FS can do. However, it works fine with modern devices which have an FTL and does not attempt to override the FTL. As for checksums, it was something that, whether added as a response to requests or not, makes me trust the FS more. We all know the bit-rot occurs on SSDs just like on HDDs, so a checksum can save your behind sometimes. Still not as nice as BTRFS with DUP or a RAID mode which duplicates data, but it's better than saving a corrupted file or attempting to load some corrupted data, especially if said data sits near the kernel.
Zucca, how is BTRFS "slow"? It always comes up close tot he top in speed tests on everything I have seen, both on Phoronix and other sites. It is faster than NTFS on my gaming rig (I use the Windows port of BTRFS since ReFS is only for businesses now) and unless we're talking specifically about single SSD usage, I am confused. I generally use BTRFS on single HDDs in DUP mode with compression, multiple HDDs in RAID, or on multiple SSDs in RAID. I will NOT use it on a single SSD which is where BTRFS does indeed get slow. _________________ Ever picture systemd as what runs "The Borg"? |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Tue Sep 28, 2021 5:49 pm Post subject: |
|
|
pa4wdh wrote: | eccerr0r wrote: | As a thought question, how much of the hardware should be exposed to the software?
Sounds like people don't want wear leveling details exposed to the software? |
Back in the days when SSD's were the new kid on the block of storage devices there was also the discussion if all the complexity should be done on the drives' controller. Just give the OS access to the raw flash devices so all the functions can be implemented in the kernel and as open source software. The implementation could be in a similar way as we have multiple IO schedulers, power governors, etc. so the user can choose which wear leveling/garbage collection algorithm fits the workload best. |
This discussion predates SSD. We had hardware modems and winmodes where most things had to be done in drivers, hardware raids and software or fake raids, true soundcards with 'hardware' decoders and not so. Traditionally, though, Linux people used to prefer 'hardware' implementation, since software versions typically were coming with proprietary closed drivers that often had to be reverse engineered for Linux. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9678 Location: almost Mile High in the USA
|
Posted: Tue Sep 28, 2021 8:33 pm Post subject: |
|
|
Indeed, the proprietary driver issue is one thing, but for the sake of this particular issue, assume specs are clearly available AND a reference source code driver, though lacking features or optimizations, is distributed. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3342 Location: Rasi, Finland
|
Posted: Wed Sep 29, 2021 6:29 am Post subject: |
|
|
The_Great_Sephiroth wrote: | Zucca, how is BTRFS "slow"? It always comes up close tot he top in speed tests on everything I have seen, both on Phoronix and other sites. It is faster than NTFS on my gaming rig (I use the Windows port of BTRFS since ReFS is only for businesses now) and unless we're talking specifically about single SSD usage, I am confused. I generally use BTRFS on single HDDs in DUP mode with compression, multiple HDDs in RAID, or on multiple SSDs in RAID. I will NOT use it on a single SSD which is where BTRFS does indeed get slow. | I should have been more accurate. btrfs is pretty slow when doing maintenance tasks. Especially balancing. Some operations took 23h-24h to complete. My setup had 5 2TiB-4TiB drives. Not that it's too bad, on a 247 server, because most of the tasks can be performed online. With 6 SATA SSDs it took around 9h on my desktop. Also btrfs-raid[56] not being stable means I needed to stick with raid1 or raid10. I have written one script which goes trough logs and processes them in a pipeline. btrfs was much slower on this too, but only because I had to use raid1 instead of raid5 what I use on lvm2. So it's not btrfs's fault... but it is. :P Since I'm too afraid to use btrfs-raid5.
I'll return to btrfs when it matures more. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Thu Sep 30, 2021 4:59 am Post subject: |
|
|
eccerr0r wrote: | Indeed, the proprietary driver issue is one thing, but for the sake of this particular issue, assume specs are clearly available AND a reference source code driver, though lacking features or optimizations, is distributed. |
Another issue was that CPU's were weak, so any offload of processing to dedicated "hardware" chips was a noticeable gain. It is still the case in some subsystems - e.g. graphics, HPC level interconnect networking |
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Sat Oct 02, 2021 7:53 pm Post subject: |
|
|
As somebody who still purchases dedicated video and audio hardware I can say that both make a noticeable difference to this day. Not in terms of speed of the system, but in terms of audio quality and heck, let's see you play Ark on epic settings on an Intel HD chipset.
Also, not sure how you were setup, but I have 8TiB RAID10 setups (4TiB x 4) and it takes maybe 30min to balance. I am assuming mixing and matching drive models and sizes is your issue, but I have never done such a thing. I am old-school in my RAID configurations and match everything. _________________ Ever picture systemd as what runs "The Borg"? |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3342 Location: Rasi, Finland
|
Posted: Tue Oct 05, 2021 7:17 pm Post subject: Yup. |
|
|
The_Great_Sephiroth wrote: | I am assuming mixing and matching drive models and sizes is your issue, but I have never done such a thing. | Yeah. I mix my drives to avoid "sequential drive failures". I do not seek so much for speed but operations that last over 6h is a bit too much. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
The_Great_Sephiroth Veteran
Joined: 03 Oct 2014 Posts: 1602 Location: Fayetteville, NC, USA
|
Posted: Wed Oct 13, 2021 3:04 pm Post subject: |
|
|
Well FWIW, in my professional life (my career), we order identical drives when setting up a NAS/SAN/RAID system and have never had them all fail at the same moment in time. Normally one goes and we replace it with an identical model and keep trucking for months or even years. I do get it though. I have stuff dating back to the 90's and DOS 6.22 on my drives. Pictures included. I'd hate to lose them. _________________ Ever picture systemd as what runs "The Borg"? |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3342 Location: Rasi, Finland
|
Posted: Wed Oct 13, 2021 8:24 pm Post subject: |
|
|
Yes. This is paranoia of some level, but also consumer hard drives...
Also I like to expand my storage sometimes, so my solution is to upgrade each hard drive whenever one is retired. In other words: get a bigger one to replace it.
We're derailing into ot territory here now. ;) _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 812
|
Posted: Thu Oct 14, 2021 5:58 am Post subject: |
|
|
dmpogo wrote: | pa4wdh wrote: | e new kid on the block of storage devices there was also the discussion if all the complexity should be done on the drives' controller. Just give the OS access to the raw flash devices so all the functions can be implemented in the kernel and as open source software. The implementation could be in a similar way as we have multiple IO schedulers, power governors, etc. so the user can choose which wear leveling/garbage collection algorithm fits the workload best. |
This discussion predates SSD. We had hardware modems and winmodes where most things had to be done in drivers, hardware raids and software or fake raids, true soundcards with 'hardware' decoders and not so. Traditionally, though, Linux people used to prefer 'hardware' implementation, since software versions typically were coming with proprietary closed drivers that often had to be reverse engineered for Linux. |
Sorry for my late reply, i somehow missed yours.
I think that there is an important difference in what we're talking about. This kind of software assisted hardware is about cheap hardware by offloading stuff to the main processor. What I was talking about is to hand over wear leveling and garbage collection from the SSD firmware to the OS because an OS has much better context about what's going on in the systems and can base it's decisions on that, something SSD firmware can never do. This means there is an actual advantage to do it on the main processor. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Thu Oct 14, 2021 6:21 am Post subject: |
|
|
pa4wdh wrote: | dmpogo wrote: | pa4wdh wrote: | e new kid on the block of storage devices there was also the discussion if all the complexity should be done on the drives' controller. Just give the OS access to the raw flash devices so all the functions can be implemented in the kernel and as open source software. The implementation could be in a similar way as we have multiple IO schedulers, power governors, etc. so the user can choose which wear leveling/garbage collection algorithm fits the workload best. |
This discussion predates SSD. We had hardware modems and winmodes where most things had to be done in drivers, hardware raids and software or fake raids, true soundcards with 'hardware' decoders and not so. Traditionally, though, Linux people used to prefer 'hardware' implementation, since software versions typically were coming with proprietary closed drivers that often had to be reverse engineered for Linux. |
Sorry for my late reply, i somehow missed yours.
I think that there is an important difference in what we're talking about. This kind of software assisted hardware is about cheap hardware by offloading stuff to the main processor. What I was talking about is to hand over wear leveling and garbage collection from the SSD firmware to the OS because an OS has much better context about what's going on in the systems and can base it's decisions on that, something SSD firmware can never do. This means there is an actual advantage to do it on the main processor. |
I don't see why wear levelling is better known for OS than it can be known to firmware ? My intuition says it is not a job for OS. I buy a drive, I (or OS) should be interested primarily what raw speed it provides and what is the amount of the available storage, which basically manufacturer should guarantee. OS should be concerned with the best utilization of I/O bandwidth and not starving process for I/O, not onto which transistor the recording goes. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Thu Oct 14, 2021 4:17 pm Post subject: |
|
|
The OS could, with the assistance of the administrator, know that some writes are expected to be read-mostly for a long time, and so would preferentially send those to well worn areas, so as to conserve unworn areas for data that will be rewritten often. More generally, I think there is a suspicion that the authors of the drive firmware just want to get something that works well enough the drive can be sold, not returned under warranty, and not get terrible reviews in the press. Beyond that, they don't care to do an optimal job. For example, some early SSDs earned a bad reputation because their TRIM functionality, while not broken, was implemented in the naive way: immediately trim now, blocking all other activity in the interim. Later, more clever drives improved on this, by offering queuing of the commands for later execution, and prioritizing regular work ahead of trimming work. If the control had been in the kernel, a simple kernel upgrade would offer this improvement to everyone. Since control was in the firmware, only people who can and do upgrade their drive firmware get the better behavior. Since most firmware is extremely proprietary, some - maybe even most - people who bought the naive drives were unable to get the improvement at all, because their drive vendor didn't see it worth the effort to write and release a smarter firmware.
Authors of the kernel want to get the best value for the money paid for the drive, because in many cases they are running the kernel on that drive, so it's their personal money at stake. Thus, they will consider various optimizations that a firmware author would think are not worth the time to write. Also, kernels are much easier to upgrade than drive firmware. Firmware authors are understandably reluctant to have "new and improved" drive firmware posted every few months. On the kernel side, it is routine that a new kernel comes out every few months. |
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 812
|
Posted: Thu Oct 14, 2021 4:57 pm Post subject: |
|
|
dmpogo wrote: | I don't see why wear levelling is better known for OS than it can be known to firmware ? My intuition says it is not a job for OS. I buy a drive, I (or OS) should be interested primarily what raw speed it provides and what is the amount of the available storage, which basically manufacturer should guarantee. OS should be concerned with the best utilization of I/O bandwidth and not starving process for I/O, not onto which transistor the recording goes. |
Because the OS knows your workload (or can be told so by the admin), the SSD nor it's manufacturer know anything about your workload. AS best they can do some generic optimizations. If they implemented enough logic to detect some filesystems to do some additional optimizations it's very unlikely they implemented all of them, and encryption would even make it impossible.
Trim is already a nice example where the OS has to give information to the SSD to be able to it's job. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3342 Location: Rasi, Finland
|
Posted: Thu Oct 14, 2021 5:16 pm Post subject: |
|
|
Back in the days even the head movement was controlled by the OS iirc. ;) _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Sat Oct 16, 2021 6:20 am Post subject: |
|
|
pa4wdh wrote: | dmpogo wrote: | I don't see why wear levelling is better known for OS than it can be known to firmware ? My intuition says it is not a job for OS. I buy a drive, I (or OS) should be interested primarily what raw speed it provides and what is the amount of the available storage, which basically manufacturer should guarantee. OS should be concerned with the best utilization of I/O bandwidth and not starving process for I/O, not onto which transistor the recording goes. |
Because the OS knows your workload (or can be told so by the admin), the SSD nor it's manufacturer know anything about your workload. AS best they can do some generic optimizations. If they implemented enough logic to detect some filesystems to do some additional optimizations it's very unlikely they implemented all of them, and encryption would even make it impossible.
Trim is already a nice example where the OS has to give information to the SSD to be able to it's job. |
While SSD and its manufacture know the thermal performance of the chip, and can control the load to optimize it, and even perhaps decide what areas can be used more than other to improve thermal behaviour and longevity ..... Or they know that that address area
performes faster next to the other due to some proximity of transistors or whatsever. There is lots of possibilities. If anything, my feel is that the design of filesystems is becoming irrelevant as far as the performance of the storage goes. You know, ext2 on SSD's is working pretty fine. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3267 Location: Canada
|
Posted: Sat Oct 16, 2021 6:28 am Post subject: |
|
|
Zucca wrote: | Back in the days even the head movement was controlled by the OS iirc. |
That actually made sense, since head positioning was pretty simple and transparent in what does it do. Not to say that even further back in the day you would write assembler-like code directly manipulating memory to do your high level computations (not even hardware control).
The balance what is meaningful to expose to OS shifts (and sometimes - back and forth). SSD's now are closer to RAM than to the spinning disk |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Sat Oct 16, 2021 9:40 am Post subject: |
|
|
Quote: | Back in the days even the head movement was controlled by the OS iirc. ;) |
That was in the days when drives used stepper motors for head movement.
Floppies always have. You can even make music with the head steppers. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pa4wdh l33t
Joined: 16 Dec 2005 Posts: 812
|
Posted: Sat Oct 16, 2021 10:03 am Post subject: |
|
|
LOL, i wonder what was read from the floppy while it made that music
Quote: |
While SSD and its manufacture know the thermal performance of the chip, and can control the load to optimize it, and even perhaps decide what areas can be used more than other to improve thermal behaviour and longevity ..... Or they know that that address area
performes faster next to the other due to some proximity of transistors or whatsever. There is lots of possibilities.
|
Then i guess both have their pro's and con's. My personal preference would be some open source implementation in the kernel rather than a well-hidden firmware in the controller of a disk.
I think that's also why we don't really agree here: We both speculate on things the firmware might do, we both don't know for sure (unless you work for one of them of course ).
Quote: |
If anything, my feel is that the design of filesystems is becoming irrelevant as far as the performance of the storage goes. You know, ext2 on SSD's is working pretty fine.
|
I'm not saying it isn't working well (i'm using ext2/3/4 on my own SSD's). One thing i could think of manufacturers might want to do is to do filesystem specific optimizations, even if it's just to get better benchmark results. I don't know if they actually do that. _________________ The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world
My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Oct 16, 2021 1:26 pm Post subject: |
|
|
pa4wdh wrote: | One thing i could think of manufacturers might want to do is to do filesystem specific optimizations, even if it's just to get better benchmark results. I don't know if they actually do that. |
If they did, it would be for NTFS on Windows 11 anyway. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54232 Location: 56N 3W
|
Posted: Sat Oct 16, 2021 1:33 pm Post subject: |
|
|
pa4wdh,
Some SD cards are hardware optimised for VFAT, so that access to the file allocation table is fast. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|