LosslessSwitcher icon indicating copy to clipboard operation
LosslessSwitcher copied to clipboard

disk writing

Open chaeyoungdul opened this issue 2 years ago • 14 comments

hi, I used the app for a couple of times, but I noticed it was writing and reading the disk way more than it needs or should. I saw it read 55 gigabytes and write 11 in 2 hours.

chaeyoungdul avatar Aug 02 '22 09:08 chaeyoungdul

Very interesting, how did you see the read/write metrics? Is it incurred on storage or memory, and is it just a metrics for how much is read/written rather than persisted amount?

It doesn't surprise me that it reads so much, since it reads OSLogStore (like the Console app), fairly often, to monitor latest sample rate values.

Not sure what's causing the 11GB of writing, however.

Also, which version did this occur? Thanks!

vincentneo avatar Aug 02 '22 16:08 vincentneo

Hey,

I saw the metrics in activity monitor. It was in the disk tap so it would be writing on the SSD, i hope. The amount is overtime so it's added up.

I think it would be kinda weird for it to read like 400MB for a song (mini album consisting of 2-3 songs) that's quite a lot more than the songs it self. Could you explain that?

The versions i used were the stable and beta. Both had the writing issue. I will add pictures later if they are helpful.

At least thank you for making such an app, I really appreciate it and hope to help a hand :)

Greetings, Chaeyoung

chaeyoungdul avatar Aug 02 '22 18:08 chaeyoungdul

to add to the problem when I stop the music it start writing.

chaeyoungdul avatar Aug 02 '22 22:08 chaeyoungdul

I think it would be kinda weird for it to read like 400MB for a song (mini album consisting of 2-3 songs) that's quite a lot more than the songs it self. Could you explain that?

I personally don't think the logs would take up that much, so will be debugging that when I can.

to add to the problem when I stop the music it start writing.

This is so weird.

vincentneo avatar Aug 04 '22 10:08 vincentneo

I think it would be kinda weird for it to read like 400MB for a song (mini album consisting of 2-3 songs) that's quite a lot more than the songs it self. Could you explain that?

I personally don't think the logs would take up that much, so will be debugging that when I can.

to add to the problem when I stop the music it start writing.

This is so weird.

yeah idk why it does write to the disk but yeah it writes with 10MB a second. that's very interesting.

I am on apple silicon m1 and ventura public beta 2, maybe they play a role.

chaeyoungdul avatar Aug 04 '22 10:08 chaeyoungdul

Screenshot 2022-08-04 at 6 40 49 PM Very interesting... nothings playing right now and ^. Intel mac user here on Monterey so not a specific platform issue for sure.

vincentneo avatar Aug 04 '22 10:08 vincentneo

Screenshot 2022-08-04 at 6 46 44 PM

So my initial guess seems correct. Instruments is reporting that the read/writes came from calling OSLogStore APIs, which forms the foundation of how LosslessSwitcher works, so this might not be fixable.

Why would reading using OSLogStore write so much though? I have no idea so far...

vincentneo avatar Aug 04 '22 10:08 vincentneo

oh very interesting to see

the reading Is not my top concern but the writing is, as it is damaging to the ssd and seems unnecessary.

chaeyoungdul avatar Aug 04 '22 11:08 chaeyoungdul

Yep, just started using this and activity monitor does report alot of activity on the SSD which is of some concern. On an M1 Max MBP if it helps.

danielrdotcom avatar Sep 16 '22 20:09 danielrdotcom

Possible that you are writing to virtual memory?

DarinFlippo avatar Nov 10 '22 16:11 DarinFlippo

Possible that you are writing to virtual memory?

Very likely actually, though i would think that would be handled by the system of some sort.

I sometimes do have up to 30 gigabytes in swap

chaeyoungdul avatar Nov 10 '22 17:11 chaeyoungdul

Possible that you are writing to virtual memory?

Unlikely. My (probably wrong) guess is the OSLogStore API does some weird processing whereby it reads the logs, write it somewhere temporarily (probably in some usable format), etc. We need an Apple Engineer to answer that question unfortunately.

Very likely actually, though i would think that would be handled by the system of some sort.

I sometimes do have up to 30 gigabytes in swap

Now I'm worried about the part where you have 30GB as swap memory. What are the memory/RAM usages for LosslessSwitcher on your system? if its 30GB of memory use (aside from disk read writes), then its definitely a separate memory leak issue.

vincentneo avatar Nov 11 '22 16:11 vincentneo

Now I'm worried about the part where you have 30GB as swap memory. What are the memory/RAM usages for LosslessSwitcher on your system? if its 30GB of memory use (aside from disk read writes), then its definitely a separate memory leak issue.

Well first of all i have only 8 gigabytes of ram. Second of all i use a lot of apps simultaneously (logic pro is a big ram eater). Third of all i have a vm running at the same time. (Yes my laptop lags like crazy) grand MA 2 on pc is not for mac and so isn't MA3D which i do need

so yeah it's not a memory leak it my laptop not being adequate (the only way to get a new one is my dad.he doesn't see me needing a new laptop, but that's a separate issue).

Losslessswitcher uses like 50 megabytes of ram

chaeyoungdul avatar Nov 11 '22 20:11 chaeyoungdul

Thanks for the clarification @chaeyoungdul

vincentneo avatar Nov 14 '22 04:11 vincentneo