Use A Ram Disk To Reduce Writes On Solid State Drives
The write speed of Solid State Drives is usually lower than the read speed. Write operations on slow SSDs can slow down the system performance and reduce the longevity of the drive; this was especially the case for first and second generation Solid State Drives.
Specialized programs such as SSD Drive Tweaker or Flash Fire aid the user in optimizing the system for Solid State Drives.
We have also covered tips to optimize Windows for Solid State Drives in the past which suggested among other things to move caches from the SSD to another drive.
That tip was problematic, especially for users who used SSDs exclusively on the device.
A workaround for those users is to use a ram disk for caching purposes. Ram disks, sometimes also called ram drives, are storage devices that use computer memory to store the data.
This is obviously only a feasible alternative if the PC has enough system memory that can be spared for the ram disk. Any PC with three or more Gigabytes of computer memory should be able to run a ram disk for caching purposes.
This article covers the creation of the ram disk and explains how to move the cache from the SSD to the ram disk.
Using a RAM Disk
Windows users can select from a variety of Ramdisk applications. We have covered Ramdisk.sys in the past for instance but will use the Dataram Ramdisk software this time.
Update: The company has reduced the maximum from 4 Gigabyte to 1 Gigabyte. While that is still sufficient for many tasks, we suggest you try Ramdisk.sys or the last freeware version of Softperfect Ramdisk instead which you can download with a click on the following link: ramdisk_348setup.zip The creation process is similar to that of Dataram RAMDIsk. END
The free version of Dataram RAMDisk supports ramdisk up to a size of 1 Gigabytes. This is sufficient for moving the cache to the ram disk and for some other uses as well.
Start the Dataram RAMDisk Configuration Utility after installation. The tool is listed in the Dataram Ramdisk start menu entry.
The ram disk is configured in the Settings tab. The size, file system and boot sector settings can be defined in here. How much memory should you turn into a ram disk? That depends on the memory installed and the required size of the caching directories. If the PC has 4 Gigabytes of RAM, you could set the RAM disk to 512 Megabyte for instance, and adjust it in one direction or the other if required.
One option to find out how much of the memory can be used is to open the Windows Task Manager by pressing Ctrl-Shift-Esc, switch to the performance tab and look at the physical memory section. Using half of the ram under the available section is usually a safe bet.
The file system can either be Fat16 or Fat32. Users who prefer NTFS or another file system need to select unformatted and format the disk in Windows after it has been created.
A click on Start RAMDisk will create the disk and assign a free drive letter to it.
The f: drive in the screenshot above is the newly created ram disk.
The second step of the process is to configure the applications and operating system to make use of the ram disk by changing the cache directories to a location on the new ramdrive.
We give examples for the Windows temporary file folders, Firefox and Internet Explorer caches.
Windows Temporary Folders
The Windows temp directories are stored in the system's environment variables. The easiest way to open the configuration window is by pressing Windows-Pause on the keyboard and selecting Advanced System Settings from the sidebar of the window that opens.
Locate the Advanced tab in System Properties and click on Environmental Variables. Here we have user variables and system variables.
Candidates here are for instance the TEMP and TMP system and user variables. They can be edited by selecting each one of them and clicking on Edit. Simply enter the new path in the variable value field and leave the variable name as it is.
Changing Firefox Cache
Open the Firefox web browser and type in about:config in the Firefox address bar.
Enter browser.cache.disk.parent_directory in the filter field and double-click the parameter.
you need to create a new preference in Firefox for this to work:
- While on about:config, right-click in the main field and select New > String.
- Name that string browser.cache.disk.parent_directory.
- Double-click it afterwards, and enter the path that you want Firefox to use for its cache, e.g f:\cache
Internet Explorer Cache
Open Microsoft's Internet Explorer and click on Tools > Internet Options. The Internet Options are also accessible from the Windows Control Panel.
Click on Settings next to browsing history in the General tab and on Move Folder in the next window to move the temporary Internet Files folder to the ram disk.
There is another benefit of using a ram disk for caching locations. The ram disk will automatically be cleared on shutdown which makes recovery of those caching files afterwards impossible (unless a snapsnot of the ram is taken shortly after shutdown).
Solid State Drives benefit from the reduced write operations and it might even speed up some operations marginally.
Changing the IE folder wouldn’t “stick” between reboots on my Win7 (x64) machine. I had to use Junction (http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx) instead. Junction can be used to relocate Flash and Silverlight temp files as well.
Instead of symlinks, junctions and path changes, isn’t easier to use Disk Management MMC interface and instead of assign a drive letter for the ramdisk, to map it as the desired folder?
Dead link !
There’s absolutely no need to do this at all on modern SSDs. While the write speeds are lower than the read speeds, the former is still significantly higher than a standard HDD.
The issue here isn’t about write speed, it’s about wearing out the drive by writing too much. By relocating frequently written files (e.g. caches) off the SSD you will reduce the wear on the drive, and by placing them on the RAM it becomes faster (if I remember correctly, currently RAM is faster than SSD).
Thus even if you don’t have a HDD this tip is useful for increasing longevity of the SSD. On the other hand, if the computer has insufficient RAM than making a RAM disk will only worsen the situation.
That’s right, it is mainly about longevity but also about performance if first generation SSDs are used which do not support Trim or garbage collection.
If you have a decent SSD then the limited number of writes will honestly not be an issue for 99% of people. Take for example, the X25-M from Intel. This will last for a minimum of 5 years with 20GB of writes per day (http://goo.gl/aqCH)!!! A typical computer user will get nowhere near this figure.
Moving caches and the page file off of the SSD is stupid because this is exactly what SSDs are good for. I could understand why you might do this if you had one of the first gen JMicron-based SSDs, but not any more.
Could someone explain this to me. How come an SSD drive is limited in the number of writes it can perform?
The article below explains how SSDs work and why they have write limits…
A link to a 25+ page article about every detail of SSDs is not really a great answer to the question! :P
Even though the article is very long it is definitely worth a read. Alternatively you can just skip to page 6.
Use this then instead
In simplest terms a “write” is essentially storing a charge in a cell, this charging “wears”/breaks down the insulator/silicon oxide a little bit each time and eventually breaks it down so it no longer “insulates” at all meaning there’s no capacitance and hence no charge can be stored in that cell. How badly/quickly this happens depends on the configuration of the device to an extent but it’s mostly a materials engineering problem. E.g. some organic hybrid flash cells I made only lasted about 1 or 2 cycles because the insulator was an organic material. :-)
I was wondering if you could help me figure out whether doing the things mentioned in this guide, or the things mentioned in https://www.ghacks.net/2009/01/10/optimize-windows-for-solid-state-drives-usage/ would actually be useful.
The specifications of my setup (desktop) can be found here: http://www.techcomet.com/p/my-gadgets.html
I generally, prefer to keep things “default” unless there is a real tangible benefit. For example, I have an i7 920 but I have not yet overclocked it. Right now I can run the latest games at the highest frame rates and I can run applications like Photoshop and Avid without any performance lost. Hence, I don’t see the need to perform any tweaks.
However, there are obviously times when things don’t start up immediately and I have to wait a few seconds. So, I wanted to find out if the tweaks you have mentioned would be beneficial.
I have a Intel X25-M MLC 80GB SSD, should I apply these settings? What would be the difference?
Also, would you have any advice on Photoshop scratch disks? Should it be set to a SSD or my HD?
What is your opinion of page files? I have read a lot of articles suggesting that it is on a separate partition. Is this valid reasoning?
Sorry to use you like a help-file but you seem to know what you are talking about!
Abhiroopb, I actually have the same SSD and would leave the configuration as is. If you run Windows 7 you are already using TRIM which helps reduce the wear leveling, if not I suggest you look at Intel’s SSD Toolbox. My page file is on the SSD drive as it is the fastest drive on my computer, there would only be a benefit if you would have a faster drive as a secondary drive. If not, keep it there. I would generally say to leave everything as is if you do not experience slow downs while working with data that is stored on the SSD.
Moving the page file into a RAM disc is ludicrous … your moving the area needed to buffer RAM (because RAM is low) into RAM….????
Ignoring SSD’s entirely, if I have 8GB RAM on my Win7 64-bit system, would I get any benefit whatsoever by setting up a RAM drive as described in this article? Or does Windows essentially already do that for me behind the scenes with cacheing, etc.?
Yes, setting up a 4GB ramdisk and putting your temp folders on it relieves disk usage and uses RAM’s ultra fast speeds instead. It should give you some improvements in speed when multiple programs are open and using temp files. (Firefox, Photoshop, etc)
Don’t bother with a RAM disk. Seriously. You will just make your computer *slower* because Windows will be forced to swap a lot more compared to if there wasn’t a RAM disk.
Read this post for a good explanation…
I’m using the described setup for about a year now with a 64GB SSD and a 2 GB RAM disc and 8GB memory in my machine. Works flawless and it is defintaly faster .. also you can use the ram disc for any other application which needs swap space, like photoshop and similar…. i can recommend this definatly!!
yes, this definitely makes sense. if you have 4GB or more of RAM, using RamDisk for the temp files will definitely help on the longetivity and slight performance boost of the system
I have actually used this software and moved the Windows temp but it resulted in the system becoming unstable.
Firefox, on the other hand, resides permanently, all of it, on the RAMdisk and works beautifully.
Why not just disable all Firefox disk caching and use memory cache only?
browser.cache.memory.capacity [this is up to you, depends on your RAM]
browser.cache.memory.enable is a true/false option
doesn’t exist but needs to be created.
Faiakes you said “I ”ll try”
So did you try?
Tell us about your experience
Thank you in advance
lol doesn’t disabling browser cache make the swapfile cache instead? *anyhow i need to know a good 3rd party freeware ramdrive that starts in config.nt in windows xp x64 so i can have it preconfigured before login.
every time system boot ramdisk change letter depend on different attached usb external drive in my system (which happen quite offend). So my question is if ramdisk can assign letter, for example T:, whenever my system reboot. So my temp folder path won’t be invalid.
A newbie question. I just started using Dataram and created a 4 Gb Ramdisk and just wanted to ask in your settings, do you have to check the box to “Load disk image at Startup (C:\Ramdisk.img) and Save Disk Image on shutdown(C:\Ramdisk.img) ” ?
When I check my local drive: C , I have two huge files (Ramdisk and Ramdisk.img.bak) which are 4 gb each.
Thanks so much in advance.
I’m answering from memory so bare with me. As far as I understand the settings, they allow you to save the contents of the ramdisk to the computer so that they can be loaded again on the next system startup. If you want to start clean, you do not have to do that. If you keep data in the ramdisk that you want to save and access in the future, you may want to do that.
This is why SSD to me is a useless product, sure it’s faster but it has very little value. You’re paying considerbly more for considerably less space to get an increase in speed, this may in fact be a benefit worthwhile to many.
However this benefit becomes completely diminshed because SSD have no longetivity; what’s the point of spending all that money if you have waste your time using your new drive less? Sounds pointless to me lol. Once they figure out that problem and it becomes cheaper that it’s worth switching.
SSD have no longevity? Useless product?
The MHz wars are over. The battle to get data in and out of a CPU register continues.
The funniest thing about your comment, is that you probably have never tried an SSD.
It will change your life.
Stop reading the internet, but more than that stop posting.
You are not entitled to your opinion because it is comes from empty space.
>SSD to me is a useless product
Don’t knock it if you haven’t tried it. They are blazingly fast, deadly silent, and improve the user experience by an order-of-magnitude over spinning hard disks.
And not only is a RAMDisk a good idea, it’s a good idea for all PCs (at least, those that have RAM to spare). I put all Temp folders, IE, Firefox, and Tbird caches, Windows event logs, and etc. on mine and sleep well knowing the built-in thrashing that Windows gives storage is gracefully handled by RAM. The only time that part of your storage scenario enters the picture is when you shut-down your PC (and write the .img back to your SSD).
Those who denigrate this idea don’t know whereof they speak.
I have a system with only SSD disks and would like to know how to put thunderbird cache on RAMdisk .
>I have a system with only SSD disks and would like to know how to put thunderbird cache on RAMdisk .
First create a directory on your RAMDisk and save it, e.g. MyThunderbird, then go to Thunderbird’s Tools menu, select Options, and under General select Config Editor. Right-click anywhere inside there and select New String with the name
and then enter your RAMDisk directory location w/double-slash e.g.
While you’re there, you might want to look at browser.cache.disk.capacity and make sure it’s a reasonable size given all you’re putting on your RAMDisk.
This article only shows a single backslash, while my surfing suggest double was necessary. In any case you’ll want to test to make sure it works.
After you restart Tbird it will place its Cache folder into the above. Note these about:config entries are the same as made for Firefox! Love Mozilla!
thx for the help!
Ive done a couple changes fo firefox. First to disable disk cache and then to use memory.
“browser.cache.disk.enable to set the value to False -> Right-Click anywhere -> New -> Integer -> Preference Name “browser.cache.memory.capacity” -> value memory size in KB. Enter 32768 for 32MB, 65536 for 64MB, 131072 for 128MB, etc. -> restart Firefox”
So first I did this. then I found out about ramdisk and I did this:
browser.cache.disk.parent_directory set to ramdisk.
So is this all I need to do, or should I change browser.cache.disk.enable to “true” now since I use ramdisk ?
Well the ramdisk is not used if you do not enable the disk cache. At least that’s what I believe needs to be done.
Worrying about the number of writes to an SSD and then adjusting your browser settings to reduce the writes through cache management would only make a difference if you were looking at millions (and I do mean millions of sites a day). MLC drives lifespan are roughly calculated at writing 200GB per day every day will last 6 years – SLC it’s 500GB a day for 10 years. So for a 120GB SSD you’d have to completely overwrite the entire disk 1.75 times a day every day for 6 years before an MLC drive will fail. That is a hell of a lot of browser cache!
my situation is different – i’ve put a Kingspec 64GB PATA SSD into an old Thinkpad X40 (1.2Ghz Pent w/ 1 GB Ram) and i was wondering if there’s any way to configure an SD card in the external SD slot as a RamDrive?
in my (huge) ignorance i have no idea what pathways and bottlenecks are involved – but i’m looking to squeeze all the performance possible from this machine….
No, a RAM Drive is by definition a drive set up on RAM.
You can use it as a readyboost drive. Click on it and then go to properties and then select “Use this drive for Readyboost,” it may or may not be fast enough to do it. With only 1GB of RAM it will probably give a good boost in performance. I would recommend you look into upgrading your RAM as well. You could get at least 1.5GB in that thing. Replace the 512MB DIMM with a 1GB DIMM, it will cost you about $10 if you get it used on eBay.
Do I have to edit all variables in the “System variables” or just the TEMP and TMP?
On my PC, %USERPROFILE% = C:\User\OLAVO and %SystemRoot% = C:\Windows. If I only type F: before %USERPROFILE% I have the path F:\ C:\User\OLAVO and If I only type F: before %SystemRoot% I have the path F:\C:\Windows.
So I have to type F:\User\OLAVO in place of % USERPROFILE% and F:\Windows instead of % SystemRoot%, right?
No, you do not want to change *all* of your variables, only those related to the %TEMP% and %TMP% entries.
Changing anything else can (and most likely will) cause your login to temporarily / permanently stop working.
Also, note that multiple drive letters in the same statement (and not separated by a separator like “;”) will fail – you can’t got to F:\C:\ – that is 2 different physical locations that you’re trying to go to at the same time.
So I did it right.
Is a ramdrive still a good idea when considering what’s available now in the world of controllers?
the search filter does not seems to work in Firefox anymore, what should I use?
Imdisk > Dataram
I did this and it’s screwed up my comp. RAM disk will not start, it locks the comp, and now I can’t access Environmental Variables to change the paths back to default. What to do please?
Well I know not a lot of people have a ton of ram, but in my case I’m running 16GB which still isn’t a ton now days but I run 4gb RAM for temps to save data usage on my 2 SSD drives on my system. I did a speed test and it comes down to a slightly faster ram drive, and for people that do not know about cache’s or how to keep temps clean this is also useful, but additionally it’s useful to extend the life of your ssd.
I get about 20% increase on smaller files about about 100% increase on larger files from crystaldisckmark on speeds between ssd to ram (image the differance from spindle to ram lol
if i want to change it all back to defaults, what should i type in? there is no ‘revert back to defaults’ button in the Environment Variables section…??
You just change the location back to a non RAM drive, reboot, then stop the RAMdisk program from running and reboot again.
The firefox ~ “browser.cache.disk.parent_directory” appears to be hidden since Fx 45
RAMDisk is very useful feature for old PC/Notebooks having none SSD. You should only ensure that you PC has enough RAM (~4GB). Creating of 450 Mb RAMDisk and putting the portable browser on it will speed up your web surfing significantly.
Back when I experimented with RamDisk usage, it quickly became a nuissance. I advise just forking over the money for a second drive.
Also, for your firefox cache, a much better method is to have your entire profile located on another drive. This has more than one benefit, because in addition to achieving less read/write on the SSD you also have a convenient backup of all your customized firefox settings, bookmarks, extensions, EVERYTHING. Simply copy and paste the profile folder with firefox in a state of existence you are happy with, and store the backup profile somewhere. Now say you want to use firefox on a different computer, upon installing firefox be sure not to click “launch firefox” at the end. Instead, type run, then type “firefox -p” to bring up the profile window. Click create, then click choose location, then point to your backed up profile folder. Now you have your perfectly configured firefox like magic in no time.
Hi. A little wary of using a third-party tool I really don’t understand very well to perform all this; however, I would like to reduce stress on my SSD (ergo me reaching this page!) :). My question is, that I can just perform the tmp file “move” to begin with, correct and that ought to relieve it a bit? Also, it may seem like a weird or silly question, but, here goes. I’ve seen tutorials on using programs to move Download, Document, Video, Music, etc. folders from an SSD to an HDD (or vice-versa) … but it can be done MUCH simpler by simply creating the Location and Move functions. Couldn’t the same be used to move the cache? Just curious. Thanks!