I am a macOS (MacBook Pro mid-2015, has a 256GB SSD) user that downloads a lot of stuff using torrents. I know that torrenting can harm your SSD so I decided to create a RAM disk where I temporary store my torrents until they are finished. Is this a good practice?

I am thinking it is because there are no more writes to the disk. However, there is less RAM for the system to use and page swapping will happen more often, which will cause more writes to the SSD anyway. Eventually, even the RAM disk may be swapped to the SSD and then I will have won nothing (maybe just that I will somehow batch writes to SSD).

  • 4
    check the normalized usage of your SSD, and you will find that even with your usage it will be good for 200 years. the issue is commonly over exaggerated. – Aganju Jan 17 '18 at 17:17
  • 1
    People please stop thinking that writing to your SSD will destroy it. Technology has vastly improved since SSDs came out. Your SSD will outlast the computer you use it in - and probably the next couple after that. The whole point of the drive is to WRITE to it! – Keltari Jan 18 '18 at 9:48

Flash or SSD devices wear/slow over writing, not reading. Since you intend to copy from the RAM disk to the SSD anyway, I don't see any gain here.

Also, you mentioned, swapping is happening more often since you have starved your system of RAM, with your RAM disk. This sounds counter productive, because it is actually best practice with SSDs to reduce swapping (swapiness on linux with SSDs).

So, depending very much on the size of your available RAM, the size of your RAM disk and the size of your torrents - even in the best case, you have very little to gain here - in all likelihood you'll slow down your system because it has to swap more often, which will also unnecessarily increase writes on the SSD.

  • Isn't it working like this: if RAM disk -> one big write, if not RAM disk -> many small writes? – Qback Jan 17 '18 at 14:54
  • 1
    Your SSD (generally) doesn't care about "many small or one big write" - see here (sorry I'm on mobile) stackoverflow.com/a/21735886 – Robert Riedl Jan 17 '18 at 15:08
  • So why then some people say that torrenting destroys SDD? – Qback Jan 17 '18 at 15:21
  • 1
    @Qback - Who says that besides uninformed people? The lifespan of a typical SSD is expected to last 3-5 years, with several dozen GBs written to it daily. – Ramhound Jan 17 '18 at 15:51
  • 1
    @Qback, correct. No difference – Robert Riedl Jan 17 '18 at 16:29

No. it is pointless.

Incoming torrents typically consist of many, very small data-packets. If these are individually written to disk by the torrent client you will get a lot of small random writes all over the place.
(Bear in mind that the data-blocks in a torrent are send in fairly random order to your computer. You don't get them sequentially.)

In general a high number of small random writes isn't good for any harddisk and it even worse for a SSD. That is where the "torrent kills your SSD" idea comes from.

But in reality it isn't an issue:
First of all: SSD's are tougher than many people think.
The OS/filesystem will cache disk-writs to some extend anyway.
And most importantly the torrent client itself will do that even better:
Typically a torrent client gathers data-blocks together (in memory) in so-called "chunks" and flushes the chunks to disk when they are complete (or when a certain time-period has expired, like an editor auto-saving your document every X minutes).
In many clients you can even configure the size of that cache-buffer and the recommendation is to set it as large as feasible given the amount of RAM you have available.
This caching prevents wear and tear on the disk (for SSD and classic HD) and, on classic HD, improves overall performance by reducing disk-trashing.

Setting up your own RAM-disk isn't really needed. It won't add any additional benefit.

As I'm one of the programmers who did some work on libtorrent (used by many torrent clients) and also on other file-sharing programs that have similar caching requirements I know what I'm talking about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.