Ram Disks

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
deltarho[1859]
Posts: 3667
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Ram Disks

Post by deltarho[1859] »

I have recently updated my Ram Disk software and drive benchmarking software and retested them.

I use a Ram Disk for the Microsoft Edge and Mozilla Firefox cache. Drives don't like many small files, they wear out faster, especially SSDs, and the Temporary Internet Files (TIFs) are just that. I have a small partition (D:) at the edge of the internal HDD for the pagefile and nothing else.

Here is a comparison between my internal HDD (partition E:) and a Ram Disk (R:).
Image
The Ram Disk is 512MB so a block of 256MiB was used. The HDD has respectable read/write speeds for large sequential files. However I am not interested in those types of files – for TIFs 64K and 32KB files need looking at. Here the HDD is struggling. The Ram Disk also sees a drop for small files, but nothing as dramatic as with the HDD.

The Ram Disk is writing 556 times faster than the HDD for 32KB files. For reading, the Ram Disk is 676 times faster.

From our perspective, using a Ram Disk is as if the browsers aren't using a cache. :)

I have also relocated the Environment Variables, TEMP and TMP, to the Ram Disk.

The Ram Disk software used is by SoftPerfect and I have used that for many years. The latest version, 4.3.3, improved the read/write performance for small files; which is good news for TIFs. Their website has a free utility, cacherelocator.exe, to easily relocate the caches of Edge, Firefox, and Chrome. The Ram Disk software has an easy TEMP/TMP relocator.

Some of you will already be doing the above, but I bet a lot of you are not.
marcov
Posts: 3402
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Ram Disks

Post by marcov »

Wear is measured in total bytes written, which is typically in the magnitude of the whole drive written 200-300 times (for a typical cheap QLC SSD as the Intel 660p).

If you have a gig in in temporary files on a 1TB SSD, and they are completely rewritten each day, you need to become 666-1000 years old to experience the death of the SSD.

So yes, what you say matters, but only with very high mutation counts for non trivial amounts of data. (in percentage of the disk size)

Having a million files on a SSD(*) does make managing the MFT a bit sluggish, specially you can really notice the first access after a boot is relatively slow. (probably due to the MFT being read). SSDs with own RAM are generally snappier than without. You also want to have 12-16GB or more so that the cache can be in memory permanent.

(*) camera images from work mostly in my case, 300k-1MB each.
deltarho[1859]
Posts: 3667
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Ram Disks

Post by deltarho[1859] »

I have been formatting the Ram Disk with NTFS. After a spot of reading, it appears that using exFAT is better; exFAT is normally used for SSDs.

With 64KiB/32KiB files, like TIFs, I am getting 15%/17% faster reads and 10%/12% faster writes. No big deal, but it was easy to reformat, no restart required.
Post Reply