Bug 4432 - Purge of FileCache stalls slimserver for large collections
: Purge of FileCache stalls slimserver for large collections
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Streaming From SlimServer
: 6.5.1
: PC Windows XP
: P2 major (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-27 14:56 UTC by Grahame
Modified: 2006-11-07 13:50 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grahame 2006-10-27 14:56:15 UTC
Purge of FileCache in 6.5.1 nightlies after 10/6 takes excessive time for large collections;
Long enough to stall slimserver, and starve SB clients. :(


[QUOTE=andyg;147724]Any version of 6.5.1 after 10/6.[/QUOTE]

On my system(s), Windows XP "enough" space on C:\ but with a large collection (300GB \ 500GB +) of tagged flacs with album art Typically 300x300 - ish, on 6.5.1 nightlies after this fix, I've noticed the following.

At hourly intervals (consistent with the cache purge fix), Lots of disk activity, some Slim CPU activity, (indicating its I/O bound) lasting for between say 3-8 minutes. This stalls all clients of slimserver (indicating slimserver is busy on its main thread?).

Observable effects.

Playing Slim devices:
Buffer empties, not refreshed, music stops. Unresponsive to any command until disk activity finished. So thats only about 90% uptime on an hourly basis when listening :(

Non playing slim devices running clock screensaver:
Clock does not update - giving good feedback of when issue started - and how long it lasts.

Anybody else experiencing this issue?

Is a "one size fits all" solution appropriate for all cases?
Would some logging and recording help?
(e.g. starting purge... purge ended ... took X mins)
Log the elapsed time for a purge, and if its longer than some threshold - say the buffer size on a SB, defer the next purge, or  take into account free space on the disk, or whatever).

Moving cache purge to separate thread? ( is this possible?, what about cache coherency etc)

Any more info you need?

I've opened this as Bug
Comment 1 Ben Sandee 2006-10-27 15:18:29 UTC
I think I may see this too -- it's particularly noticeable on my SliMP3's which have pretty dang small buffers.
Comment 2 KDF 2006-10-27 15:38:38 UTC
see bug 4431
Comment 3 Adrian Smith 2006-10-28 03:39:15 UTC
Bug 4431 is only half of the problem - we can also generate lots of resized artwork thumbnails which are cached.  The cache purge code needs to read all of these every hour at present.  My proposal is to only purge the artwork at startup (as well as fix to bug 4432 which would remove this from the cache)
Comment 4 Adrian Smith 2006-10-29 10:19:59 UTC
I've added a proposed solution to trunk in change 10502 and 6.5.1 in change 10505.

Please try subversion or tomorrow's nightlies to see if this improves it for you.
Comment 5 Grahame 2006-10-30 22:49:28 UTC
Looks good - Managed a continuous listening session of 4 albums, from a playlist of 18 on a system with 
1796 albums with 22373 songs by 2320 artists without interruption, which wasn't achievable recently. 
Comment 6 Chris Owens 2006-11-06 09:28:54 UTC
Should we mark this as 'fixed', then, triode?
Comment 7 Adrian Smith 2006-11-06 11:21:33 UTC
I believe so - it should be much less of a hit than before and not occur while players are on.
Comment 8 Chris Owens 2006-11-07 13:50:51 UTC
Anyone still experiencing problems should feel free to re-open or add a comment.