How much space do I need to reserve for %TMP% and %TEMP%?

0

I was thinking about how to gain a bit of performance, I am using an Intel 510 120GB SSD as sysdrive and the performance on that drive should be great.

However, the Random Access ( 4k ) is a bit "bad", if you compare to other SSDs.

So I was thinking that I could reserve a couple of GB from my 12GB RAM and use that as a %TMP% and %TEMP% drive.

Also regarding %TMP% and %TEMP%, is it OK that they are wiped everytime the computer reboots? I mean, applications should not store persistant data there, right?

My questions

  • How much space do I need for %TMP% and %TEMP%
  • Does it matter that it is wiped each time I reboot?
  • Will it perform better than the SSD in my case?

Filip Ekberg

Posted 2011-04-20T13:37:24.457

Reputation: 591

Answers

2

How much space do I need for %TMP% and %TEMP%

As with all things, "it depends." Most of the time you can get away with a few dozen to hundred MBs. However, I've noticed that most .MSI installers get copied to %TEMP% before Windows Installer really starts to do anything, presumably to make sure that they're local. (And not on a network where latency, bandwidth, disconnections can be a problem.) Sometimes very large logs get created temporarily, that sort of thing. It's easy to end up needing several GB of space for a short period of time, but normal use seems to be < 100 MB on my systems.

Does it matter that it is wiped each time I reboot?

No. In fact, I have scripts I deploy to systems to delete the temp folders of every user and the system-wide temp on startup. Too many poorly written applications simply don't clean up after themselves, or files don't get deleted when a program crashes, and I've seen systems where programs start to fail in unusual ways because there's so many files in the temp folder that it's impossible (or very time consuming) to even find a usable name.

Will it perform better than the SSD in my case?

Sure. RAM is going to be roughly an order of magnitude faster than your SSD, both in IOPS and throughput. Will it be noticeable? I highly doubt it. It might be benchmarkable, but not noticeable. Can the OS do a better job of figuring out what to put in that RAM rather than you attempting to dedicate it to %TEMP%? Almost certainly.

afrazier

Posted 2011-04-20T13:37:24.457

Reputation: 21 316

Thank you, exactly what I was looking for. I was hoping that I could avoid too many of those random (4k) read/writes that are made to %TMP% by putting it on a ram-drive.. – Filip Ekberg – 2011-04-20T15:10:22.010

Don't worry about it too much. Anand has done some excellent writeups on SSD life. The short version is that unless you really try to abuse the drive, you'll replace it before it dies for other reasons, much like one does with HDs now. How many geeks have collections of < 500MB drives collecting dust? :-)

– afrazier – 2011-04-20T16:02:29.677

I am not worrying about it dying, rather I want to maximize the performance. :) – Filip Ekberg – 2011-04-20T16:23:15.057

@Filip: In that case, my standard advice is "Don't try to outsmart Windows." :-) If you can identify a particular problem and fix/work around it that's one thing, but poking and hoping is another. – afrazier – 2011-04-20T17:15:35.960

1

However, the Random Access ( 4k ) is a bit "bad", if you compare to other SSDs.

Even "bad" on the 510 is orders of magnitude faster than the fastest consumer hard drives. On writes, the 510 runs 8000 IOPS at 4k random. Reads are 20000 IOPS.

Don't bother with the RAM drive.

Hyppy

Posted 2011-04-20T13:37:24.457

Reputation: 3 636

This should have been a comment instead, it doesn't answer my question. – Filip Ekberg – 2011-04-20T14:30:15.317

Your question was in bold. "Is a ramdrive suitable for this?" -- Especially considering the context, the answer is "no." – Hyppy – 2011-04-20T14:31:38.470

I've updated the question to clearify a bit. Thanks. – Filip Ekberg – 2011-04-20T14:34:14.173