Spotify is a popular music service that is available as a web version, desktop clients and as applications for various platforms.
Some Spotify users noticed back in June that the client was causing excessive writes on the disk. While the reported write amount varies a lot, some stated that they were seeing 10Gb/hour writes on their computer by Spotify alone.
Update: Spotify has released a new client version that addresses the issue according to the update history. Updating the desktop client to version 1.0.42 should fix the amount of written data. Feedback from users suggest that the situation has improved but not been resolved completely. End
What's particularly interesting about this is that the writes occur even if Spotify is kept open in the background but not playing any songs.
If you do some math, you will realize that those writes cannot be explained by song caching even if the highest song quality is used.
Users who notice the behavior are worried that Spotify alone may cause their computer's Solid State Drives to die early due to the excessive number of writes.
Not all Spotify users are affected by the issue. I let Spotify Free run on a test system for some time and noticed no excessive writes at all.
If you are using Spotify, first thing you may want to do therefore is to monitor the resource usage of the client to find out if the version of Spotify running on your device is writing excessively to the drive.
While you can use a lot of tools to monitor writes on a system, I suggest you simply start by looking at what the Windows Task Manager reports (or the excellent Process Explorer).
- Hit Ctrl-Shift-Esc to launch it.
- Switch to processes or details depending on which version of Windows you are using afterwards.
- Locate the spotify.exe process or processes, and check their I/O write bytes.
- You may need to add the data to the table by right-clicking on a table header and selecting "select columns".
Note that the data is bytes which means that you need to convert it to Gigabyte first. You can use this tool for that. Basically, 1000000000 bytes are roughly 0.931 Gigabyte. So, if you see something like 2.3 million bytes like on the screenshot above, that is just about 2 Megabyte of data.
What if Spotify causes excessive writes?
Spotify users who analyzed the issue found out that the writes cannot be linked to song caching but affect certain database files in the Spotify folder: mercury.db and mercury.db-wal in the root Spotify folder.
So, what appears to happen is that Spotify runs the vacuum command on the database aggressively which causes the writes. Vacuum optimizes the database file by reclaiming space using various optimization routines. This process creates a temp database file that replaces the original file after the command ran its course.
Spotify users have a couple of options to deal with the issue.
- Use the Web Client and not a desktop client. This is by far the easiest option but it may not be convenient.
- Move the cache files to a RAM disk, or another drive (not SSD if possible). Ram disk uses system memory as a temporary disk which would mean that Spotify would write to RAM instead of the actual hard drive.
- Edit the Spotify binary and replace the VACCUM command with blanks. Note that this has not been tested on Windows, but it seems to work fine on Mac OS X. Two issues arise from this: first, you have to redo the process after each update. Second, the database file may get slower over time since it is never vacuumed.
Now You: Are you noticing excessive writes when running Spotify?