Old 20th November 2007, 23:46   #1
CoSte
Junior Member
 
Join Date: Nov 2007
Posts: 2
Cache Usage

On one of the forums I read the following opinion about cache and HDD usage in Winamp.
Quote:
Winamp, on the other hand, performs a ton of non-cache reads (IRP_MJ_READ) and directory opens/closes, which is far, far worse than foobar2000. Unlike foobar2000's cache reads, these slow reads DO have an impact on the system.
Quote:
FASTIO_READ is from the system cache. IRP_MJ_READ is not, and is a fairly slow (relatively speaking) read from the disk. Winamp makes lots of those. About half the reads, actually. It also queries the plugins directory every second, making 4 IO calls every second.
and, at last
Quote:
If Winamp really reads the file using IRP calls as often as foobar2000 reads from cache using FASTIO, then yes, it's probably more harmful than foobar2000 (and marginally at that), though I can't really prove that claim, since I'm not sure how damaging and expensive the calls really are to the hard drive either.
But, on the other hand:
Quote:
I used Foobar for a couple of weeks until i decided to see the hard drive usage, and well it was just through the roof, so I decided to change back to Winamp. To put it into prespective, I left foobar running for an hour and in Filemon, There had been well over 900,000 read writes to the drive, at which rate the drive would have failed prematurely.
Is it true about cache and HDD usage in Winamp?
Thank you!
CoSte is offline   Reply With Quote
Old 21st November 2007, 00:25   #2
DJ Egg
Techorator
Winamp & SHOUTcast Team
 
Join Date: Jun 2000
Posts: 35,822
Quote:
It also queries the plugins directory every second, making 4 IO calls every second
This is not true. Whoever said that originally must have been using some 3rd-party plugin(s), possibly the streamripper plugin (which is known to exhibit that behaviour).

When I run Filemon, the only entries I see for winamp.exe are a couple every few seconds for the actual decoding/playback of the playing file (but nothing compared to the insane rate of activity from the likes of explorer.exe, firefox.exe & svchost.exe).
If Winamp isn't playing anything, then there is no activity.

Alas, I've no idea about the cache thing...

[EDIT]

Okay... on further research (using filemon w/ advanced output), Winamp uses FASTIO_READ 99% of the time (100% with mp3, wma, ogg, etc playback).
But I've noticed a problem with M4A playback though, where it occasionally uses IRP_MJ_READ, and we'll be fixing this for the next release (note that it's libmp4v2/mpeg4ip code at fault, which is actually a 3rd-party open source library).

[EDIT 2]

Hmm, looks like in_flac could be guilty too.
This will also be addressed for the next release.

Thanks :-)
DJ Egg is offline   Reply With Quote
Old 21st November 2007, 12:43   #3
CoSte
Junior Member
 
Join Date: Nov 2007
Posts: 2
Thank you!
CoSte is offline   Reply With Quote
Old 21st November 2007, 13:20   #4
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
These were still pretty minor issues. I suspect that the person who originally came to those conclusions was either 1) using a version prior to 5.5 or 2) using a third party plugin that accesses winamp.ini constantly. INI reading in Windows is slow, as it requires a file lock, uncached read, cache flush and file unlock.
Benski is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump