On 25 Dec 2020 at 22:36, Jon Brase wrote: > Dec 25, 2020 3:26:42 PM Frantisek Rysanek > <frantisek.rysa...@post.cz>: > > > A) standard desktop Windows (XP or earlier) with swapping left > operational, 1 year of lifetime sounds about right. > > It sounds like you're using the card for the OS + swap, though, > rather than having separate cards for the OS and swap. My plan is to > separate them, and probably to overprovision the swap device > significantly. > allright - using a dedicated physical CF card for swap, and another one for the system itself, is definitely a good idea. As a way of protecting the OS boot files. If the swap drive dies, the system boot drive will likely survive, and you only need to replace and format the dedicated swap drive.
It's a good start. As for the question if this is good enough, even with the dedicated swap drive, depends on your actual circumstances (swap load = volume and patterns). I suggest that you try this with a cheap MLC card for the swap drive and see how long it survives in your daily practice. And then maybe consider switching to an SLC card to get 20 times the endurance. Trying to protect your system boot partition by making a dedicated swap partition, on a shared flash drive, is moot / futile. The two layers of block mapping below LBA are oblivious of your partitioning above the LBA layer. The wear leveling mechanism inside the drive will happily shuffle blocks belonging to your "read only system boot partition" and mix them with the volatile swap partition, under the hood - for the sake of keeping the erase count per erase block level across the space of the underlying NAND chips (to utilize the available erase count evenly). When unrecoverable errors inevitably start to occur, the drive as a whole is gonna die, your system boot partition won't be accessibe either. I've noticed that you want to have about 4 times the swap space compared to physical RAM. This means to me that your historical machine is starved of RAM, and you envisage enhancing the volume of RAM by a quick swap space. Hmm. The actual success of that idea will depend on how large your typical "DRAM working set" actually is. If you have a flock of apps running at the same time, allocating lots of virtual memory, but only a fraction of that virtual memory needs to be in RAM at any one time (a timespan of say a couple dozen seconds), you're good to go. I can imagine a scenario where you have a myriad desktop apps open, but most of them are just waiting on the taskbar and are out of focus - so that Windows swap them out eventually, which causes no sorrow. But if you need to have much of that virtual space in the "working set" at the same time, your solution with a flash-based drive probably won't satisfy you, performance-wise. If I consider a single channel of 64bit PC133 SDRAM (for instance), that's 1 GBps of sequential transfer rate. UDMA100 is only 100 MBps at its very best. Also, while the latency of your RAM is about 60 ns, for the CF card it's possibly a couple hundred microseconds for reading. It gets worse. If your machine thrashes the swap space intensively, generating lots of those tiny write transactions, a typical CF card will quickly get its relatively tiny transaction buffer (and "SLC zone", if used) full of pending writes and will slow down noticeably at the outer ATA interface. Don't be surprised to see 25 IOps or even less, pauses lasting a couple seconds etc. A pretty far cry from those ~4k IOps that you might come to expect, based on random read performance. => If you're serious about upgrading your legacy machine in this way, I suggest that you purchase two CF/IDE adaptors and some cheap CF card and try for yourself. If you have a chance to test your CF cards on an IDE channel under Linux, consider trying this simple proggie of mine: http://support.fccps.cz/download/adv/frr/hddtest-1.1.tgz There are certainly other load generators / benchmarks. And there's the iostat tool, from the Sysstat package, which can show you the IOps load at the block layer, generated by any kind of software. Don't trash the CF card with random *writes* for too long, as such a test quickly eats away its available erase count. Try comparing your CF-based swap-on-flash solution with an alternative setup, using some SATA-based SSD/CFast/mSATA and a SATA/IDE converter. How about converting this all the way to a small Optane drive :-) Those have like 6k of permitted overwrites, if memory serves - and have really short latencies. Except that ehh... they seem to be NVMe = PCI-e based, rather than SATA. Ahh well. I can't seem to find any figure, how much RAM your machine actually has, just that you want 4 times that much in swap. AFAICT Windows 98 had a problem using more than 512 MB of physical RAM, not sure about how much swap they could use - but let's assume that 4 GB total would be a maximum for a 32bit OS. I actually wanted to say this: if you only have use for maybe 1 GB of swap, it's no problem that your partition can only be 2 GB, on say a 32GB flash drive - the wear leveling algorithms don't know or care about the love and hate relationship between you and your BIOS, those 32 GB of NAND or 3D-Xpoint chips will be used evenly for wear leveling of any abuse that you throw at the drive. Frank _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user