trakt / Plex-Trakt-Scrobbler

Add what you are watching on Plex to trakt.tv
1.45k stars 166 forks source link

constant disk write activity #310

Open chkuendig opened 8 years ago

chkuendig commented 8 years ago

for some reason there's constant write activity from the trakt plugin writing to the disk, even when nobody is playing anything from plex. this doesn't happen initially after a plex restart, but once something is played, it wont stop, even when playback is paused or and all clients are disconnected.

this is quite annoying as it's running on my living-room NAS. any idea what might be the cause of this?

logs below show iotop with no playback active in plex and the server running for about 12hs. the trakttv.bundle has written over 400MB to disk and keeps constantly doing so (at around 20-100KB/sec)

Total DISK READ :       6.72 M/s | Total DISK WRITE :      11.85 M/s
Actual DISK READ:       6.72 M/s | Actual DISK WRITE:       7.95 M/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND 
  937 be/3 root          0.00 B    400.73 M  0.00 %  4.28 % [jbd2/dm-1-8]
26275 be/4 plex        800.00 K    697.64 M  0.00 % 10.82 % Plex Plug-in [com.plexapp.plugins.trakttv] /usr/lib/plexme~plication Support/Plex Media Server/Plug-ins/Trakttv.bundle
Total DISK READ :       4.05 M/s | Total DISK WRITE :     176.37 K/s
Total DISK READ :       3.92 M/s | Total DISK WRITE :      82.33 K/s
Actual DISK READ:       3.92 M/s | Actual DISK WRITE:     211.71 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                                                                                           
26275 be/4 plex        0.00 B/s   43.13 K/s  0.00 % 83.73 % Plex Plug-in [com.plexapp.plugins.trakttv] /usr/lib/plexme~plication Support/Plex Media Server/Plug-ins/Trakttv.bundle
fuzeman commented 8 years ago

Do you have automatic syncing enabled (Run every or Run after library updates options)?

There is an issue where syncs could be triggered when you start watching something, this could explain all the reads + writes on your drives starting when you play something.


I'm currently tracking IO usage on my system to see if I can reproduce this issue, will review the results of that in a couple of hours.

fuzeman commented 8 years ago

Initially noticed a constant ~115 bytes per second in writes:

12:50:05 17101 be/4 plex         68.00 K      3.10 M  0.00 %  0.01 %
12:55:08 17101 be/4 plex         68.00 K      3.14 M  0.00 %  0.00 %
13:00:02 17101 be/4 plex         68.00 K      3.17 M  0.00 %  0.00 %
13:05:05 17101 be/4 plex         68.00 K      3.20 M  0.00 %  0.00 %
13:10:08 17101 be/4 plex         68.00 K      3.24 M  0.00 %  0.00 %

Switching the plugin logging levels to "INFO" resulted in no reads + writes while idle though:

15:15:09 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.01 %
15:20:02 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:25:05 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:30:09 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:35:02 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:40:05 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:45:08 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:50:01 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
15:55:04 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %
16:00:08 17101 be/4 plex        108.00 K   3148.00 K  0.00 %  0.00 %

So the issue you are encountering must be caused by automatic syncs.

I would suggest disabling the Sync - Run after library updates option and setting the Sync - Run every option to something like "3 Hours" (or greater).

chkuendig commented 8 years ago

Thanks

I now turned off "Sync - Run after library updates" and "Sync every" completely and limited collection and watched to push (and turned off all others). "Scrobble" is still checked.

I'll let you know if this changes anything.

cryptochrome commented 8 years ago

Hi, I experience the same issue. Already being discussed on the Plex forums too.

chkuendig commented 8 years ago

update: it doesn't seem to happen anymore with the settings as described above.

@cryptochrome i couldn't find that thread, do you have a link?

cryptochrome commented 8 years ago

It's the huge Trakt thread on the Plex forums. There are a few comments about this issue starting here: https://forums.plex.tv/discussion/comment/1172988#Comment_1172983