16 ms·
Spotify excessively writing to drive
- piotrjurkiewicz 10y agoThe last good Spotify client version was 0.8.5. I still use it. This was a proper desktop app, with the interface built with Qt and Linux integration (MPRIS D-Bus Interface). Todays Spotify desktop client is nothing more than another web browser, which uses WebKit to render all its interface as a web page inside the app window.
- totalZero 10y agoIs there a way to measure Spotify write activity on my Android phone?
- sumitgt 10y agoYes, I'm interested to know if this behavior happens on the phone. Given the space constrains on phones, I think they wouldn't dare.
- vel0city 10y agoWhile this bug is writing a lot of data, it doesn't mean it will actually use a lot of data at one time. From other comments, it sounds like it is defragmenting a database file which is normally only a few hundred MB max. However, defragmenting this file means it essentially writes a duplicate of that file, switches over to the new file, and deletes the old one. So, it uses a lot of writes, but its writing the same couple hundred MB over and over again, with the total usage only being 2X the max size of the file, assuming no fragmentation. If there is a lot of fragmentation, that multiplier would be less than 2.
- subie 10y agoI had heard Spotify uses P2P quite a bit. People on this forum are reporting that its eating up 50GB's on idle. Could it be possible they are using idle clients to help stream content to other users?
- pmalynin 10y agoOkay but streaming content is a read operation, not write.
- hood_syntax 10y agoNot if they have your computer get content to serve, perhaps based on popularity.
- PaulKeeble 10y agoThey could be "pushing" the most popular content to those clients for the others benefit even if you never listen to it.
- mynameisvlad 10y agoIt looks like most of it is being written to a SQLite DB, so probably not.
- jpalomaki 10y agoBased on quick glance to the thread, somebody has pin pointed the problem to embedded SQLite database vacuum operation. That is optimizing the storage of database and maybe it is being called too often.
- fixmycode 10y agoisn't the vacuum operation's job to reduce database size by removing free space and defragment the data? edit: ok, I got the answer by myself: apparently, Vacuum copies the database to a temporary file and then it overwrite the original, it's not the usage, it's the writes that are the problem here.
- stephengillie 10y agoSpotify has a few nifty features that must be using a fair bit of bandwidth. Features such as the ability to remote control another instance means maintaining a control channel. The ability to switch music to your local device means all devices must stream the song, as though it were playing on that device, to allow immediate switching. These work quite well for the user, as it's enjoyable to listen to music on your stereo at home, then just tell the phone app to switch from your stereo to your phone (maybe over headphones) while you're mobile. And heavy use of P2P between devices on the same LAN or Wifi network would reduce internet bandwidth use, but may unintentionally cause a lot of churn and disk use.
- scrollaway 10y agoTo those who start with the comments: this is about Spotify the application, not Spotify the company. Big difference:)
- serg_chernata 10y agoGood tip, I also thought this was about some kind of SSD reliability testing done by their engineers.
- Xylakant 10y agoWell, it sort of is. Though not intentional.
- radicality 10y agoHow else could it be interpreted?
- lucb1e 10y agoI have no idea so I'm guessing the title was edited after this comment.
- scrollaway 10y agoIt was. It used to be something like "Spotify killing SSDs by writing hundreds of GBs to them". It almost made it sound like performance testing.
- 0xCMP 10y agoJust checked on a Mac with 10 days uptime in Activity Monitor and Spotify has written 28.99GB and read 325MB. For comparison Chrome wrote 1.93GB, iCloud (cloudd) wrote 10.47GB, Mail 927.4 MB, and Slack 607.8MB.
- dictum 10y ago10h uptime here and Activity Monitor is reporting 28.7GB written.
- mikeash 10y agoI forget how long it's been running, but mine reports 947.99GB written! Holy cow!
- MikeKusold 10y agoYou can run `uptime` on both OS X and Linux to see how long a machine has been running.
- mikeash 10y agoThe relevant figure here would be how long Spotify had been running, wouldn't it? There's probably some way to get that info too, but of course I killed the app as soon as I saw what was going on, so it's too late! Edit: uptime does give it a firm upper bound, at least. My current uptime is a bit over 12 days. So that's an average of 80GB/day at least, more if I started Spotify sometime after boot.
- technojunkie 10y agoI only used web based Spotify https://play.spotify.com/ https://play.spotify.com/ You can block all ads with uBlock Origin too. I can't find a reason to download the application now.
- toomanybeersies 10y agoWell the application doesn't require flash.
- ar15saveslives 10y agoI'd better Flash than new SSD.
- nacs 10y agoWith Adobe Flash installed it's only a matter of time before a new plugin exploit allows your SSD to be reformatted/flashed.
- angry-hacker 10y agoClick to activate solves this problem fairly well.
- technojunkie 10y agoChrome and Edge have Flash built in. Problem solved.
- ukyrgf 10y agoA good reason would be if you have a Premium account and want to listen to something better than 128kbps MP3s.
- technojunkie 10y agoI am also an audiophile but I would wager that most regular people could not tell the difference anyway.
- sofaofthedamned 10y agoI assume this is related to DRM keys changing? Either way it's ridiculous.
- philipkglass 10y agoI had to go through a lot of comments in that thread to find a working workaround. On OS X, Open /Applications/Spotify.app/Contents/MacOS/Spotify in a hex editor. Search for "VACUUM;" Replace with "xxxxxx;" On Windows, apparently the key "VACUUM;" string is in libcef.dll but I don't have a Windows system to see if editing it the same way provides a workaround like on OS X. I used hexcurse from homebrew. After opening the file hit tab once to switch to the ASCII side, Control-F to search for VACUUM;, then type "x" six times to overwrite each character. Quit and save. EDIT: fixes
- ihuman 10y ago6 or 7 x's? In your example, you used 6.
- philipkglass 10y ago7 x's, one to overwrite all of VACUUM; including the terminating semicolon. I didn't count the x's in the quoted text that I copied from the thread.
- 0x0 10y agoIf you overwrite the ; is there not a risk you might cause the next legitimate sqlite operation to fail?
- SturgeonsLaw 10y agoThey might get lucky and overwrite the last SQL statement in the method. Seems likely with a statement like VACUUM.
- cjg_ 10y ago6, it wont start otherwise. I left the ; in.
- philipkglass 10y ago
- Spooks 10y agoThis is pretty interesting. Should software that destroy someone's physical items be handled the same way as hardware destroying something physical (Samsung Note 7 for an exaggerated example).
- erkose 10y agoThe software in not "destroying" the SSD. It is using it properly, but excessively.
- Spooks 10y agowell yes, my comment was more hypothetical relating to this story (though it will wear out your SSD quicker). In the terms of lets say something cause your SSD to burn out within a year, with a known bug. I feel the company the software bug should be held responsible.
- martin-adams 10y agoThis reminds me when Dell refused warranty repairs if VLC was installed[1] Turns out that you could increase the volume causing hard clipping, which caused physical problems on the speakers. [1] http://en.community.dell.com/support-forums/laptop/f/3517/t/19492918 http://en.community.dell.com/support-forums/laptop/f/3517/t/...
- lorenzhs 10y agoThat was a dell issue, though, and had nothing to do with VLC. See the following comment by jbk (VLC lead): https://news.ycombinator.com/item?id=7205875 https://news.ycombinator.com/item?id=7205875
- ilaksh 10y agoAre there any viable alternatives to Spotify?
- jfindley 10y agoGoogle play music and Apple music are IMO viable alternatives, in some cases depending on what devices you use. Available music is comparable, price is equivalent (and google music includes youtube red as well).
- chinathrow 10y agohttps://www.deezer.com/ https://www.deezer.com/
- LeoPanthera 10y agoLots. Google Play Music. Apple Music. Amazon Music Unlimted. Or this massive list: https://en.wikipedia.org/wiki/Comparison_of_on-demand_streaming_music_services https://en.wikipedia.org/wiki/Comparison_of_on-demand_stream...
- voltagex_ 10y agoI just moved from Spotify to Apple - the Android app is good, but doesn't respond to all music intents, doesn't broadcast music info (so no Scrobbling) and downloading playlists for offline use doesn't seem to stick like Spotify did, where new tracks added to playlists would be automagically downloaded.
- mindslight 10y agoTorrent.
- wlesieutre 10y agoPandora supposed to be launching one sometime next year. They bought the remains of Rdio, who used to have a good client.
- KingMob 10y ago
- krenoten 10y agoI occasionally find the client from the arch linux aur repos pegging a CPU core as well. bad syseng :(
- Normal_gaussian 10y agoI run Spotify with cpulimit, when they used to have lyrics your machine would barely function if you didn't.
- Dramatize 10y ago8 days uptime and Spotify has written 272GB
- inopinatus 10y agoI've seen this with an enterprise application. It was just a data pipeline and never needed much storage but it sure was a writeaholic. Workaround was to mount a ramdisk for the working set. Not a spotify user, cannot say this is viable solution.
- ryanlol 10y agoThis is a fucking joke, unless you're a time traveller 100GB/day isn't going to wear out your SSDs. Most modern SSDs can easily hit petabytes, and this would be fine even if they could only hit a quarter of that. 1PB at 100GB a day would take 27 years.
- mortenjorck 10y agoThis is an interesting assertion. Can you cite it?
- coldcode 10y agoIt's sucking up your battery doing useless things. It's a bug they apparently missed or don't care about. It should be fixed.
- ryanlol 10y agoThe title was "Spotify wears out SSDs by writing 100GB/day", which is a ridiculous exaggeration. That's the only thing I was commenting on.
- minitech 10y agoIt may not wear out your drive, but it will waste power and take up CPU time and I/O bandwidth unnecessarily!
- imtringued 10y agoIt's obviously an unintentional bug and one that is easy to fix. Why do you say that it's fine that the bug wasn't fixed yet? Would you think the same if every desktop application wrote 100GB per day to your SSD?
- ricardobeat 10y agoHa! I have had this problem for months (OSX) and never looked at Spotify. In the past few days it has written 22GB already, every few weeks I run out of disk space and never had a clue why, restarting would reclaim it.
- manmal 10y agoThis should not be the reason why you run out of space. Might be memory swapping that gets released on reboot, or it's because Photoshop is closed when shutting down (scratch disk).
- ricardobeat 10y agoNever use Photoshop. Most of the time when I look at activity, it's just "kernel_service" doing the writing.
- manmal 10y agoYeah should be memory swapping then. A RAM upgrade (if possible) would eliminate most, but not all, of that. I'm quite fed up with Apple about the 16GB RAM limit for that reason.
- toyg 10y agoThis bug generates disk activity but does not actually leave files around, so it's not your issue I'm afraid.
- flocial 10y agoActually, with regard to the other comments, this could very well be the reason the parent runs out of disk space due to OSX's swap files/sleep image (I think it's fixed in the more recent versions).
- neurostimulant 10y agoHmmm, I found running Spotify on macOS makes the battery drain faster as well. If you compare it with iTunes running Apple Music, the difference in battery life is quite huge.
- wlesieutre 10y agoSpotify is built around Chromium Embedded Framework, with IIRC a separate browser instance for each UI frame. Given Chrome's battery and RAM usage, it's not surprising that Spotify performs poorly even compared to iTunes.
- justanton 10y agoWhat was the decision behind this? Why not to develop a native app (swift or objective-c), that would be better optimized and would perform better? Isn't there enough evidence that wrapped web apps like Slack or Atom (and now Spotify) perform worse than the native apps?
- luhn 10y agoSpotify's Mac app also gobbles up memory. I regularly see it consuming more than a gigabyte. As someone who's still running an 8GB machine, that bytes.
- maccard 10y agoI've not noticed Spotify to be particular bad for this, but I've noticed slack is awful for this.
- josh64 10y agoYeah especially the latest version of Slack - it helps if you remove any unnecessary teams.
- anotheryou 10y agoI can't multitask with firefox on android
- awesomerobot 10y agoYeah I'll occasionally switch to music on my phone if I'm doing a lot of memory intensive tasks. Having Spotify and Chrome open is like a RAM kiss of death.
- bdz 10y agoIs that really a big problem? I mean most modern SSDs works fine until at least 600 TB which is like 16 years with that 100GB/day rate >Errors didn't strike the Samsung 840 Series until after 300TB of writes, and it took over 700TB to induce the first failures. The fact that the 840 Pro exceeded 2.4PB is nothing short of amazing, even if that achievement is also kind of academic. http://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead/4 http://techreport.com/review/27909/the-ssd-endurance-experim...
- matt_wulfeck 10y agoI think the point here is that this is pointless process activity. Either a bug or something else. It's eating SSD write cycles, which is a finite resource, and providing very little if any benefit to the user.
- ansible 10y agoAnd consuming IO, and consuming memory bandwidth, and consuming CPU cycles, and consuming battery. It is bad all around.
- paulftw 10y agoIt is a bug, it should be fixed, it's unacceptable that it's taking so long. But tone of the discussion would be very different if this was simply "app is slow and drains battery". This is big news only because most people think Spotify will kill their SSD like by Christmas or earlier. When in fact it probably doesn't matter at all, because most computers get replaced due to natural causes in less than 8 years.
- gareim 10y ago>This is big news only because most people think Spotify will kill their SSD like by Christmas or earlier. When in fact it probably doesn't matter at all, because most computers get replaced due to natural causes in less than 8 years. From a test I've seen, SSDs can start showing issues at the 250TB mark. Wouldn't be a huge issue if Spotify were the only problem child, but remember when Firefox (and probably Chrome) were/are doing excessive SSD writes as well? And this past week, the League of Legends client was revealed to be too. If they all do 100GB per day like how Spotify does in this example, then your SSD could have issues after just under 2.5 years, which is nuts. The above is a super rough estimate as Spotify usage will vary and how bad the League client and browsers are and how often people use those vary as well, but this could just be the beginning. What if Word decided to be SSD write heavy too? Or Adobe Reader? Or iTunes? Or whatever else it is people use.
- ddrmaxgt37 10y ago15 days uptime on mac. 1TB written
- eddieh 10y ago12 days 1.13 TB. OMG! I had no idea. I wonder if this explains the random slowdowns I've had.
- r1ch 10y agoBack in the HDD age, you had to optimize applications for sequential I/O and minimize disk seeks. When you tested your software, you could audibly hear the HDD grinding away with seeks. With an SSD there's no feedback like slow loading or seek sounds to indicate you have bad I/O patterns or are constantly writing to the drive. This certainly isn't the first case of an app going crazy with writes. A great testing tool would be to induce latency on seeks or keeps track of writes / fake disk seek sounds to avoid these kinds of problems going undetected during development.
- Scoundreller 10y agoAnd failing that, LED indicators, which you could have on your case. Maybe someone can program a Mac's camera light indicator to blink when the SSD is writing?
- brazzledazzle 10y agoI recall reading that the light is directly coupled to the camera recording so bad actors can't use it while the user is unaware. But if you have to turn the camera on and off and you have the lens covered that's probably not too bad.
- teh_klev 10y agoAlready posted a few days ago: https://news.ycombinator.com/item?id=12833647 https://news.ycombinator.com/item?id=12833647
- justinsaccount 10y agowouldn't overwriting VACUUM; with --CUUM; be less invasive?
- tedmiston 10y agoHas anyone tried comparing this against the Spotify web app (https://play.spotify.com/ https://play.spotify.com/)? That might be another temporary solution.
- potrebitel 10y agoGood ! Finally this is taken to a level where Spotify might actually notice something ! There were/are threads on their forum and basically nothing happens as they seems to not care for the users.
- pasbesoin 10y agoSo, as asked in another comment here but not answered, does anyone know whether or not this affects the phone apps? I haven' noticed crazy battery burn on my Nexus 5x, but then I don't actively use Spotify much (meaning I should probably cancel it now that the trial period is over, anyway...)
- EmreErkan 10y ago15 days of uptime and Spotify wrote alone 620 GB (Total 1,07 TB). RiP my SSD...
- babak_ap 10y agoOn a Windows 10 machine, deleting the data folder seems to have fixed the issue: rm -rf C:\Users\{username}\AppData\Local\Spotify Note: Spotify will recreate the folder with a normal amount of writes.
- willlll 10y agoI wonder if they are also aggressively vacuuming the sqlite db on mobile devices too.
- 45h34jh53k4j 10y agoSerious question - how are you able to modify an application binary and not have the OS refuse to run it? Is spotify shipping an unsigned binary?
- toyg 10y agoDoes OSX actually check signatures anytime after installation ? If yes, how do auto-updates work, do they update the signature every time?
- jevinskie 10y agoIf signatures are checked, they are checked by the kernel (and its userland buddy AMFI) every time the process is launched. I'm not sure what the defaults are for macOS lately but a developer can opt-in to even more restrictions like requiring linked shared libraries to be signed with the same key pair as the executable. This library validation behavior changed in 10.12 and can now also prohibit mprotect(RWX). I'm fuzzy on the exact details of the {OS version, compiler version [yes, 10.12 changes codesign validation behavior based off of the version of the compiler, not the OS, used to build the binary], codesign requirements} mix but it is increasingly becoming more like iOS. Apple has spent the last decade developing a pretty impressive* chain of trust for code execution, starting with iOS and merging into macOS. Basically, code signing on iOS is dynamically secure, modulo vulnerabilities, and macOS is steadily on its way to become more like iOS in this regard. * But not fun for security research and having ultimate control of your device. Always the tradeoffs... http://www.newosxbook.com/articles/CodeSigning.pdf http://www.newosxbook.com/articles/CodeSigning.pdf https://developer.apple.com/library/content/technotes/tn2206/_index.html https://developer.apple.com/library/content/technotes/tn2206...
- kevinchen 10y agoApp signature checks aren't required to succeed on macOS -- the user has the ability to override it globally in System Preferences, or add an exception using the right-click menu.
- sigil 10y agoWow. I'm a Spotify on Linux user and I've been trying to track down this issue for months. System Load Indicator showed huge write spikes, but they were brief enough that I hadn't yet caught the culprit red-handed in iotop. They bring I/O to a crawl for a second or two though. Look what I found with a `cat /proc/$pid/io` on the main spotify process: rchar: 315169616727 wchar: 236191291851 syscr: 320352243 syscw: 330963886 read_bytes: 945213440 write_bytes: 230711586816 cancelled_write_bytes: 51481772032 That's 230GB written over 6 days of uptime. Granted, some of that is to the network, to an audio device, or just normal download caching. Still...good grief.
- bassman9000 10y agoSame here. I had the gut feeling something had been wrong with the Linux client for a while. Spotify also tends to show up pretty high in h/top, aside from iotop.
- gant 10y agoI had my spotify cache on a btrfs SSD with CoW enabled until a few minutes ago. Fuck me.
- techload 10y agoNow I'm glad that I don't use Spotify anymore!
- deleted 10y ago[deleted]
- phab 10y agoI think it's pretty astounding that a customer complaint thread has run to 17 pages, direct contact on twitter, a HN story and customers going to such extreme lengths as editing their binary... ... and not one engagement from Spotify themselves on the thread. Seems like pretty poor customer support to me.
- udkl 10y agoI've had a similar poor customer support. They constantly kept redirecting me to their forums or to their FAQ's when my payment wasn't going through. Finally I raised a support request and awaited their reply. That was a few months ago. Since I didn't hear back from them I gave my money to Google play music (even though I'm not a fan of the google play UI or the app).
- zegerjan 10y agoHow did you transfer all you saved songs, and playlists? Also, how is music discovery there? Spotify is crazy good with their discover weekly feature.
- fdgdasfadsf 10y agoThe discover weekly is sponsored content. EDIT I am interested are you downvoting because you (1) think I am wrong, or (2) don't like that it contains adverts, or (3) don't mind it containing adverts and think that this is irrelevant?
- zegerjan 10y agoI found some content[1] on that, but I don't think it affects paying subscribers. [1] http://www.adweek.com/news/technology/spotify-will-now-let-brands-sponsor-most-popular-playlists-171706 http://www.adweek.com/news/technology/spotify-will-now-let-b...
- afishisafish 10y agoSome of the playlist may be, but I'm pretty sure Elvis Costello, Paul Mccartney's Wings and Dâm-Funk don't need Spotify marketing.
- developer2 10y agoI'm sorry, but this has been reported since 5 months ago. How on Earth has this not been officially fixed by Spotify? Same problem here. What a joke.
- eunice 10y agoThe spotify desktop app is really shoddy, i've had problems with the 'spotify helper' process on osx draining cpu/battery and causing the fan to start, had to write a script to kill it if it's using over 90% cpu. There are posts on their support forum about that issue going back four + years so I wouldn't expect this to get fixed any time soon.
- mk3 10y agoI would suggest tweeting at @spotifycares with #stopkillingourssds :D:D https://twitter.com/MariusKubilius/status/796621559129657344 https://twitter.com/MariusKubilius/status/796621559129657344
- anotherboffin 10y agoYour suggestion is good, but their reply is a little underwhelming. I didn't expect their customer service to be of this caliber.
- spiderfarmer 10y agoStill beter than Google or Apple.
- mk3 10y agoThey reacted to the mess on the community forums and just rolled out fix with version 10.0.42
- spiderfarmer 10y agoLooks like he got a response. I sent them a DM as well.
- mk3 10y agoThey just rolled out v. 10.0.42 which according to them addresses the issue.
- cjg_ 10y agoSeems they rolled out a fix now: "We've seen some questions in our Community around the amount of written data using the Spotify client on desktop. These have been reviewed and any potential concerns have now been addressed in version 1.0.42, currently rolling out to all users." https://community.spotify.com/t5/Ongoing-Issues/Major-I-O-write-bytes-on-the-Spotify-Desktop-app-It-will-kill/idc-p/1493699/highlight/true#M25856 https://community.spotify.com/t5/Ongoing-Issues/Major-I-O-wr...
- justanton 10y agoI have this version: so far looks better around 200MB written while listening for cca 30 minutes. I really hope they've fixed this.
- Socketubs 10y agoJust use web version with uBlock and you have add-free spotify account without this ugly bug.
- crypt1d 10y agoLuckily I never experienced any of the issues here, but after reading all the comments I just decided to give Google Play Music a go. They even offer a 30 days free trial period. Even better, Google Play music seems to support my current country. With Spotify I had to use an old credit card which was from the time I was living in Czech Republic.
- majortennis 10y agoI sadly feel a bit lost without it , please give me back my music :D
- glastra 10y agoIt seems this is not fixed in 1.0.42, released today. I'm running 1.0.42.151.g19de0aa6 on Ubuntu and I'm seeing 351 MB written to disk in under 15 minutes without listening to any music at all.
- bigfunlx 10y agoI'm using 1.0.42.151.g19de0aa6 on macOS, and I see the difference. after 1hr of playing I only see ~100MB of data written by Spotify.
- bjblazkowicz 10y agoThis is what happens when you put 600 hipster developers in the same office
- stereo 10y agoThe iOS app has a mercury.db in the container’s Library/Application Support/PersistentCache/mercury.db but the app in Spotify.app/Spotify doesn’t seem to contain VACUUM - or any string really. But I’m not familiar with arm64 Mach-O binaries.
- mnx 10y agoHow to check whether this is happening to me on linux?