Why doesn't an SSD improve the speed of running applications compared to a HDD?

2

In articles/forums about PC gaming I always see people saying how Solid State Drives only make games load faster at startup (of the application) than they would with a Hard Disk Drive, and that an SSD doesn't improve the speed/performance of an application that is executing (after startup) in comparison to a HDD. Now I imagine that the first part of this is because during application startup, the operating system needs to fetch all of the application's instructions from the disk, and load them into RAM. And since SSD access is a lot faster than HDD access, program startup with a SSD should be a lot faster than a HDD.

Now what I don't understand is how this doesn't also affect programs that are currently running, since the OS can move a running application's memory pages from RAM to the page file/swap space on the disk. When the running program needs to access a page that was moved to the page file/swap space, a disk read needs to occur in order for the page to be brought back into RAM to be used by the application. So wouldn't an SSD also provide a performance increase here too, as opposed to just in application startup?

glen4096

Posted 2016-07-10T00:38:56.200

Reputation: 121

2A SSD helps load the program into memory, but the CPU still does the instruction, so the instructions the program uses are ran at the same speed. The swapping between memory and your system disk (page file, swap file, ect) would indeed be faster – Ramhound – 2016-07-10T17:30:41.827

Answers

5

You ask why SSDs don’t necessarily improve the speed of running applications compared to a traditional HDD. The reason is disk access. SSDs do read and write much faster than traditional hard disks. However, unless the application is heavy on disk I/O (reading and writing to the disk), the benefits of the SSD are lost. Even in cases where there is some writing to disk, the OS has a disk cache. This means writes are written to RAM and eventually flushed to the disk at a later point. The disk cache significantly improves the speed when using traditional HDDs.

As for swapping, yes, SSDs will perform faster, but you probably won’t notice the difference. Unless you are severely starved for free memory and the OS is heavily swapping, you will not notice the speed difference.

Keltari

Posted 2016-07-10T00:38:56.200

Reputation: 57 019

3

Generally swapping occurs only when you start running out of RAM. With today's systems with 16 GB and higher, it is unlikely that playing games would cause swapping to occur. If swapping does occur, then yes, it would be much faster when using an SSD than a HDD. However, the page file is often disabled on SSDs to limit the number of writes and thus increase lifespan a little bit.

See: Should the pagefile be placed on the SSD or the HDD?  The exception to the "swapping only when low on RAM" rule is explained in this question: Why does Windows 7 use the page file when there’s free physical RAM?

CConard96

Posted 2016-07-10T00:38:56.200

Reputation: 1 161

1I thought this was the case too at first, but for some reason my computer is using ~20% of the page file, even though I have ~10.9 GB of available RAM. I'm not sure why it's swapping with 70% of the RAM available for use. – glen4096 – 2016-07-10T02:35:42.287

1Its possible Windows is still trying to conserve memory by swapping unused memory/applications to the disk. This would probably include services or background processes that are loaded but not necessarily doing anything at that particular time like Windows Update Service. – CConard96 – 2016-07-10T02:40:24.237

1Never disable the page file. there is practically no performance improvement and causes many issues. – Keltari – 2016-07-10T04:09:49.987

"using 20% of the page file" does not mean it's actively paging appreciably. It likely means the OS has identified some stuff that's been in RAM for a while without being accessed, so it's moved it out to the pagefile to make more RAM available for more important things. – Jamie Hanrahan – 2016-07-10T04:15:12.173

The reason it is using 20% is if it needs to *start* paging it can just instantly evict the ram and continue running, there is no need to slow down the program that requested the extra ram that caused the eviction. If it only wrote out to the page file at the moment you needed to page then you would see large slowdowns in performance of whatever app you are actively using. – Scott Chamberlain – 2016-07-10T04:38:51.487

1@ScottChamberlain To elaborate: When Windows has written something to the pagefile, the RAM it was in has already been removed from the working set of the process it was in. It's on the standby page list and is already considered "available" to be repurposed (used by somethig else). But if the process references that page again before it's been repurposed, it is simply brought back into the working set from the standby list - an example of a "soft page fault". So you won't have no pagefaults in such cases, but the faults will be a lot faster to resolve than hard faults would have been. – Jamie Hanrahan – 2016-07-10T05:01:08.003

That does make sense, but the Page File usage is changing every second (within a range of 14 to 31 according to Windows performance monitor), so doesn't that mean that the page file is actively being used? – glen4096 – 2016-07-10T05:15:45.547

@glen4096 It means something is happening with the pagefile but it doesn't tell you how much. Unfortunately, in a stock Windows system, there is no way to find out how much pagefile IO is occurring. (The paging I/O counters under the memory object won't tell you - they include paging I/O to all files.) A workaround: put your pagefile on a partition all by itself. Then use the "logical disk" counters for that partition, and voila, you have your pagefile I/O stats. This is normally a bad idea on a hard drive (due to increased seek times) but on an SSD it won't matter. – Jamie Hanrahan – 2016-07-10T18:12:53.313

3

A. When your system starts to swap, you are already in trouble. You don't want to get there, ever.

B. SSDs are faster than conventional hard disks, but they are still significantly slower than RAM memory.

A running game in an adequately designed system uses only CPU, GPU, and RAM, and the hard disk is accessed only for saving game status or such. Therefore, an SSD cannot make it faster, except if the system is already overextended severely (and then more memory will do more good).

Aganju

Posted 2016-07-10T00:38:56.200

Reputation: 9 103

You are looking at the wrong specification. It is VRAM and game texture size which affects the problem. Game developers are always going to make games with more texture than you have VRAM, but less texture per level than you have VRAM. – Aron – 2016-07-11T07:22:06.280

A little bit of swapping when you change applications is no big deal. Swapping without changing applications is where you don't want to go. – Loren Pechtel – 2016-12-06T22:24:41.257

0

That's simple. Any system always has a single bottleneck; its weakest element that limits overall performance. Any improvement outside of the bottleneck is useless (and sometimes harmful).

If switching to SSD doesn't improve the performance of your application (game etc.), then disk I/O is not its bottleneck.

To find the right place to improve, monitor the resources in the runtime of your application. What is used close to 100%? Is it CPU, GPU, RAM, disk I/O? Does your machine use swap? If it does, extra RAM can be more useful than SSD.

Nick Volynkin

Posted 2016-07-10T00:38:56.200

Reputation: 167

0

This is actually quite an interesting question. To answer it, I need to give you a brief over view on how games are typically written these days.

But yes, the article is sort of right. But it is much more complicated than it would appear.

Firstly. What everybody has talked about regarding normal applications is correct. Swap drive usage will severely degradate performance.

Secondly. A SSD will improve gaming performance on a machine that has more than enough RAM to avoid traditional swapping.

Thirdly. That performance boost will be seen ONLY during "level loading".

The reason for this happening is because of the 3D Graphics Engine. Typical 3D games need to draw highly detailed 3D models constantly. In order to do so, the 3D engine will have to hold many GBs of textures in the video card.

Game developers, in a bid to make more complicated and detailed visuals, have been steadily increasing the size of the textures in each game. In fact, the VAST majority of a modern game is going to be made up of textures.

You will notice most games will not fit into your video card's memory. For example, my GPU has 2 GB of VRAM, whereas a modern game like Overwatch takes up something like 6 GB of storage.

To bridge this discrepancy, modern video games will swap textures in and out of the HDD/SSD as needed. Unfortunately this process is quite disruptive. Which is why it is usually done during "level loading".

Aron

Posted 2016-07-10T00:38:56.200

Reputation: 602