Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2000 causing disk seek twice a second (should preload current so (Read 1424 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 causing disk seek twice a second (should preload current so

Hi - I have just tried the Ram-Disk component and tested it with Process Monitor by Sysinternals with option "Show Filesystem Activity". When Foobar2000 is normally playing - Process Monitor is showing a disk read to the MP3 file twice every second. In the context of computer performance with spinning disks - this is a HUGE performance penalty among other usage (most people use the computer while listening to music in Foobar2000). The disk head is having to constantly seek back and forth between the user's current application and the background-playing MP3 file location - twice a second.

With the Ram-Disk component and playing from it - I can confirm that Process Monitor shows absolutely no filesystem activity from Foobar. It would be a great addition and a huge plus-point/value-add that Foobar could have over all other players if it would have an option to automatically load the current song in the playlist from RAM. Currently with the Ram-Disk component - it takes several clicks to have to do it with each time you play a song. This feaure should be in-built into Foobar2000. Thanks.

Screenshot of activity when not using RamDisk. Notice the frequency of disk seeks shows an access twice per second:

 

Foobar2000 causing disk seek twice a second (should preload current so

Reply #1
Furthermore - if Foobar2000 is caching the song in its own internal memory store - it should tell Windows to not pollute its own filesystem cache with the song data via "FILE_FLAG_NO_BUFFERING"
http://msdn.microsoft.com/en-us/library/cc...0(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/aa...28VS.85%29.aspx
http://mssqlwiki.com/tag/file_flag_no_buffering/

http://www.codeproject.com/Articles/51678/...ith-the-FILE_FL
>>>The only method to prevent swapping out cache is to open files with the FILE_FLAG_NO_BUFFERING flag. This, however, requires disk I/O requests to have sizes divisible by sector size (512 to 4096 bytes), which would require large rewrites of most applications that rely on being able to request different sizes.
>>>This project contains a drop-in wrapper that offers the CreateFile_NB(), ReadFile_NB(), WriteFile_NB(), and CloseHandle_NB() functions that take care of queuing and adjusting the file size when closing a file opened for writing.