Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #122113 > unrolled thread
| Started by | J Burns <burns@nospam.com> |
|---|---|
| First post | 2019-02-09 11:10 -0500 |
| Last post | 2019-02-10 23:41 -0500 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.sys.mac.system
SSD garbage collection J Burns <burns@nospam.com> - 2019-02-09 11:10 -0500
Re: SSD garbage collection J Burns <burns@nospam.com> - 2019-02-09 19:02 -0500
Re: SSD garbage collection dempson@actrix.gen.nz (David Empson) - 2019-02-11 13:10 +1300
Re: SSD garbage collection J Burns <burns@nospam.com> - 2019-02-10 23:41 -0500
| From | J Burns <burns@nospam.com> |
|---|---|
| Date | 2019-02-09 11:10 -0500 |
| Subject | SSD garbage collection |
| Message-ID | <q3mu1o$3fn$1@dont-email.me> |
I've had a 2018 mini since late December. Black Magic says it reads the internal SSD at 2520 and writes at 790. Is that write speed slow? Then I checked the USB Superspeed 10 gb/s SSD, which had been my boot drive for several weeks. It reads at 420 and writes at 130. That 130 sounded slow compared to an external drive with my 2012 mini. I booted the 2012 to check the speed of the USB 5 gb/s SSD that was my boot drive for more than a year. It reads at 419 and writes at 369. I checked the recently installed internal SSD in my 2012. It reads at 518 and writes at 440. I remember that a few weeks ago when it was new, the SSD with 10 gb USB was faster than the old one with 5 gb USB. The write speed of 130 MB/s really stands out. Would that be bad garbage collection? The old USB SSD, which reads 3 times faster, is a Samsung. They advertise their garbage collection. The new unit is a Silicon Power SSD in a USB enclosure. If it's congested with garbage collection, is there a way to clean it up, like defragmenting a hard disk? I also used a Silicon Power unit for the internal SSD in the 2012. Should I enable TRIM?
[toc] | [next] | [standalone]
| From | J Burns <burns@nospam.com> |
|---|---|
| Date | 2019-02-09 19:02 -0500 |
| Message-ID | <q3npmp$f27$1@dont-email.me> |
| In reply to | #122113 |
On 2/9/19 11:10 AM, J Burns wrote: > I've had a 2018 mini since late December. Black Magic says it reads the > internal SSD at 2520 and writes at 790. Is that write speed slow? > > Then I checked the USB Superspeed 10 gb/s SSD, which had been my boot > drive for several weeks. > > It reads at 420 and writes at 130. > > > That 130 sounded slow compared to an external drive with my 2012 mini. > > I booted the 2012 to check the speed of the USB 5 gb/s SSD that was my > boot drive for more than a year. > > It reads at 419 and writes at 369. > > I checked the recently installed internal SSD in my 2012. > > It reads at 518 and writes at 440. > > > I remember that a few weeks ago when it was new, the SSD with 10 gb USB > was faster than the old one with 5 gb USB. The write speed of 130 MB/s > really stands out. Would that be bad garbage collection? > Ha! I let the USB Superspeed 10 gb/s SSD idle. Then I tested. Black Magic said 472 read, 376 write. Before, it said 420 read, 130 write. Garbage collection is supposed to keep some blocks ready for writing. When I tested earlier, I guess I'd written so much that I was out of free blocks, so write amplification slowed me to 130.
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2019-02-11 13:10 +1300 |
| Message-ID | <1o2u2a5.fqca1v1s1zpbwN%dempson@actrix.gen.nz> |
| In reply to | #122113 |
J Burns <burns@nospam.com> wrote: > I've had a 2018 mini since late December. Black Magic says it reads the > internal SSD at 2520 and writes at 790. Is that write speed slow? It is not quite what I would expect, but that pattern is normal for Apple SSDs in recent models. For many SSDs, write speed is limited compared to read speed due to the nature of flash memory chips: they require a nontrivial amount of time to write data. Read is almost as fast as RAM, but write is rate limited. SSDs typically use a small amount of faster flash memory or RAM as a write cache to compensate for this, but if you write enough data to fill the cache, the underlying write speed of the main flash memory becomes evident. The capacity of the drive is an important factor for write speed. For SSDs in the same series, higher capacity drives contain more flash memory chips, allowing writes to be done in parallel to more chips at the same time. In general this means higher capacity SSDs in the same family will be able to write data faster. Assuming the only change is the addition of more chips of the same type, this may result in a doubling of capacity being up to twice as fast. In the real world, other factors typically limit the improvement, and at some point other limits kick in (e.g. the maximum throughput of the I/O bus, less overhead) so you don't gain any more speed by increasing the capacity. For the 2018 Mac Mini, varous people have tested the different SSD capacity write speeds and these numbers are in the right ballbark for maximum achievable speeds (ignoring caching): Capacity Max Write speed 128 GB 600 MB/s 256 GB 1300 MB/s 512 GB 1900 MB/s 1 TB 2600 MB/s (2 TB is no faster for write. All read at up to 2600 MB/s.) Therefore your measured 790 MB/s means you probably have a 256 GB or higher capacity SSD, but it wasn't achieving its maximum write speed during the Black Magic test, e.g. due to something else using the SSD at the same time, garbage collection or other factors. > Then I checked the USB Superspeed 10 gb/s SSD, which had been my boot > drive for several weeks. > > It reads at 420 and writes at 130. I see from your followup that it achieved 472 MB/s read, 376 MB/s write while idle. Those numbers are somewhat low for an SSD which uses a 6 Gbps SATA interface internally. That interface imposes a theoretical limit of 600 MB/s, but it is rare to see one get above about 580 MB/s due to protocol overhead. Achievable write speed may be lower than read speed for the same reasons as I described above. If the drive was actually not USB Superspeed 10 Gbps but really 5 Gbps, that would impose a theoretical limit of just under 500 MB/s, which sounds like what you are seeing. To cut the inevitable quibbling off at the pass: 6 Gbps SATA uses 8b/10b encoding, which means it take 10 physical bits to encode 8 data bits. That means the SATA raw rate of 6 billion bps only transfers 4.8 billion data bits per second, dividing by 8 gives 600 million data bytes per second. Similar for USB SuperSpeed, where 5 Gbps raw rate can only deliver a theoretical limit of 500 MB/s. Both have additional protocol overhead, reducing the achievable limit somewhat below the theoretical limit. A USB 3.1 gen 2 (10 Gbps) SSD with an internal USB to SATA bridge will be limited by SATA's 6 Gbps (600 MB/s) or lower for write if the SSD can't achieve the full speed of SATA. That's assuming an otherwise idle USB bus and no other delays. If the drive uses faster SSD chips and doesn't use SATA internally, its achievable limit would get closer to 1 TB/s. Getting faster than that would require a faster interface (e.g. Thunderbolt 2 or 3). A USB 3.1 gen 1 (5 Gbps) SSD cannot achieve faster than the USB limit (500 MB/s) so SATA is fast enough as an internal interface between USB and the drive controller. Apple's internal SSDs in recent models (e.g. in the 2018 Mini) use multi-lane PCI Express, so the interface is much faster than SATA or any USB variant, in the same ballpark as Thunderbolt 3. > That 130 sounded slow compared to an external drive with my 2012 mini. > > I booted the 2012 to check the speed of the USB 5 gb/s SSD that was my > boot drive for more than a year. > > It reads at 419 and writes at 369. That will have USB 5 Gbps (500 MB/s) as a limiting factor, so those numbers sound about right. > I checked the recently installed internal SSD in my 2012. > > It reads at 518 and writes at 440. That will have SATA 6 Gbps (600 MB/s) as a limiting factor. Numbers look right again. > I remember that a few weeks ago when it was new, the SSD with 10 gb USB > was faster than the old one with 5 gb USB. The write speed of 130 MB/s > really stands out. Would that be bad garbage collection? (You've already found this was faster when idle.) > The old USB SSD, which reads 3 times faster, is a Samsung. Was that a typo and you meant "writes 3 times faster" (in which case, already deemed irrelevant)? Nothing you posted shows a 3x better read speed. > They advertise their garbage collection. The new unit is a Silicon Power > SSD in a USB enclosure. If it's congested with garbage collection, is > there a way to clean it up, like defragmenting a hard disk? > > I also used a Silicon Power unit for the internal SSD in the 2012. > Should I enable TRIM? That might help reduce wear but I don't know about speed. One factor appears to be that the supposed 10 Gbps USB drive enclosure actually isn't able to achieve more than 5 Gbps. Have a closer look at your bus interface speed, e.g. the port or cable may be limiting it to USB 3.1 gen 1. If the computer thinks it is talking to the drive at 10 Gbps then the drive enclosure may be overstating its performance. -- David Empson dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | J Burns <burns@nospam.com> |
|---|---|
| Date | 2019-02-10 23:41 -0500 |
| Message-ID | <q3que7$aa3$1@dont-email.me> |
| In reply to | #122204 |
On 2/10/19 7:10 PM, David Empson wrote: > J Burns <burns@nospam.com> wrote: > > > For the 2018 Mac Mini, varous people have tested the different SSD > capacity write speeds and these numbers are in the right ballbark for > maximum achievable speeds (ignoring caching): > > Capacity Max Write speed > > 128 GB 600 MB/s > 256 GB 1300 MB/s > 512 GB 1900 MB/s > 1 TB 2600 MB/s > > (2 TB is no faster for write. All read at up to 2600 MB/s.) > > Therefore your measured 790 MB/s means you probably have a 256 GB or > higher capacity SSD, but it wasn't achieving its maximum write speed > during the Black Magic test, e.g. due to something else using the SSD at > the same time, garbage collection or other factors. My mini has 128 GB. What test do others use? I used Black Magic, and I don't know how it tests in terms of caching, block size, and randomness. > >> Then I checked the USB Superspeed 10 gb/s SSD, which had been my boot >> drive for several weeks. >> >> It reads at 420 and writes at 130. > > I see from your followup that it achieved 472 MB/s read, 376 MB/s write > while idle. > > Those numbers are somewhat low for an SSD which uses a 6 Gbps SATA > interface internally. That interface imposes a theoretical limit of 600 > MB/s, but it is rare to see one get above about 580 MB/s due to protocol > overhead. Achievable write speed may be lower than read speed for the > same reasons as I described above. > > If the drive was actually not USB Superspeed 10 Gbps but really 5 Gbps, > that would impose a theoretical limit of just under 500 MB/s, which > sounds like what you are seeing. I bought a USB 3.1 enclosure. I didn't realize 3.1 can mean 3.0 these days until I found it wasn't much faster than a 3.0 SSD. System Report said it was 5Gb. As I recall, it also called it 3.0. I ordered the kind of 3.1 I'd thought I was ordering the first time. System Report says it's 10 Gb/s. New, that 256 Gb SSD was much faster in the 10 Gb enclosure than in the 5 Gb enclosure. I wish I'd written the speeds! Now there's not much difference. Tonight I plugged in the 10 Gb/s drive and the 5 Gb/s drive. I gave them plenty of idle time before testing. Both wrote at 382! The slower drive read at 424, or 93% as fast as the faster one. That's pretty close. I unplugged my TM disk and the slower SSD and tried the 10 Gb/s again. The read was the same, but write increased from 382 to 402. Maybe the way my mini handles USB buses has some effect on speed. The SSD in my 10 Gb/s enclosure and the internal SSD are both Silicon Power 256 Gb A55's. At 518/440, the internal SSD in my 2012 is only 14% faster reading and 11% faster writing than the one in the enclosure. The internal SSD probably hasn't been used enough to have had all the blocks used the first time. If I'm right that the SSD in the enclosure used to be significantly faster, the difference in speed between the two disks could come more from write amplification than from USB. Black Magic tests reading immediately after writing, so it sounds as if write amplification would affect reading speeds. > > A USB 3.1 gen 2 (10 Gbps) SSD with an internal USB to SATA bridge will > be limited by SATA's 6 Gbps (600 MB/s) or lower for write if the SSD > can't achieve the full speed of SATA. That's assuming an otherwise idle > USB bus and no other delays. > > If the drive uses faster SSD chips and doesn't use SATA internally, its > achievable limit would get closer to 1 TB/s. Getting faster than that > would require a faster interface (e.g. Thunderbolt 2 or 3). > I saw test results comparing several TB3 SSDs along with a 10 Gb enclosure and a PCIe SSD. I think it achieved 900 Mb/s, but it was much slower with small random blocks. For now, I'm satisfied, but it's nice to look at possibilities. Thank you!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.mac.system
csiph-web