Troubleshooting Network and Slow Storage
- further information: Troubleshooting Guide
Media Center generally doesn't care where the media files themselves live on disk, if the storage where they're stored is unreliable in some way, it can certainly cause trouble. If you are having issues and your media files, or your Library, are on a slow, network, or external disk this will help you to mitigate these issues.
Library Location on Disk
One area where Media Center does require as much performance as is possible is on the disk where its Library is stored. It is best to store this on the highest performing disk that is possible in your computer, especially if your computer has an SSD. Media Center's Library is not excessively large (the author's current library is 103MB with 119K files, for example), so size is not typically a serious constraint. Using a Library stored on a slow disk will degrade performance.
Please Note: Whenever MC refers to "the Library" it does not mean the media files themselves. Instead, the Library refers to the database MC uses as its back-end.
By default, MC stores the library in your user profile's AppData directory, here:
- Windows: C:\Users\<username>\AppData\Roaming\J River\Media Center 19\Library
- OSX: /Users/<username>/Library/Application Support/J River/Media Center 19/Library
Storing the Library on a network volume, slow "media drive", or external disk is not recommended. Whenever possible, it is better to store the Library on a fast, internal disk (or high-performance RAID volume), and access the media itself stored elsewhere (on a NAS, big external disk, etc). If needed, use the built-in Library Server functionality to share your Library with other machines. This system uses a local cache of the connected server's Library, which allows it to still have fast access, and it periodically syncs any changes with the server.
If you are using a network user profile, or have your entire Windows user profile stored on a slow disk for other reasons, you don't have to use the built-in default Library. You can clone your existing Library over to a new one and store it wherever on disk you'd like. Make a folder to store your Library's data on your fastest disk, and use the Library Manager to clone your existing Library over to the new location. After you've done this and loaded the new Library, you can delete the old one from the Library Manager if you don't need it.
Media Files On a Slow or Network Disk
While we said that Media Center doesn't care where the media files themselves live on disk, if the storage where they're stored is unreliable in some way, it can certainly cause trouble. If you are having issues and the media files are on a slow, network, or external disk:
- Copy a few of the misbehaving media files over to a fast, internal disk (such as your system drive).
- Try to reproduce the issue.
- If the issue vanishes, then you know the source of the issue is probably something to do with the place where the files are stored, and can investigate solutions to those issues.
General Performance, Hangs, or Lag When Opening Views
One other issue you can encounter relates to a particular option in MC. If many of your media files are stored on a slow external or network disk which often "disconnects" (or goes to sleep), performance in MC can suffer when viewing large lists of files. If you have your files on a slow disk like this, and you find that MC hangs for a long while when first launching, or when first opening a particular view in the tree, then try:
Options > Tree & View > Advanced > Display missing file image in lists: Disable
This option enables or disables the little red Xs that show up overtop of the icons or thumbnails for files that are missing from disk. This is a nice option to have enabled (because it immediately alerts you to files missing from disk), but it can be very slow if the files are on a "bad" disk.
Note: If you need to disable this option to get adequate performance, but you'd still prefer to use it, you can sometimes mitigate the performance impact by specially crafting the Media Views you use in Media Center. If you are able to exclude large quantities of files (which are often "missing" or which you rarely need) from the views you typically use, and hide the "troublesome" files away in a specific use view elsewhere, then you may be able to improve usability while keeping this option enabled. The performance impact of this option depends largely on how many files are visible at once within a view that are on a slow disk. If you think you might be able to do this, and disabling the option above fixes your problem, feel free to ask for help on Interact and explain your disk setup.
Media Center uses pre-generated thumbnails to optimize the display of artwork throughout the application. However, for files that have never been "viewed" before within Media Center (their Thumbnails shown in a view) they must be generated on-the-fly before they can be shown. This requires a read operation (and for video files a quick render of the source) for every single file that is visible on screen, and can lead to severe performance bottlenecks if a large proportion of your Library's media files are located on a slow disk. This can cause stuttering or lagging when scrolling through views in both Standard and Theater Views, and sometimes performance problems during playback (if thumbnails are still rendering in the background when playback starts).
It will greatly speed navigation of artwork-heavy views if you pre-generate these thumbnails while your computer is otherwise idle. You can tell Media Center to build all missing thumbnails via: Options > Tree & View > Thumbnails > Build missing thumbnails
This operation runs in the background (showing progress in the Action Window) and can take some time for large Libraries or very slow disks. It is often best to start it off and go to bed!
If you notice that views are difficult to work with at first, and draw the thumbnails slowly as you scroll, but that performance improves once you stay in the area where the artwork generation has all been completed, you will probably benefit greatly from having a high-proportion of your thumbnails pre-drawn. MC's Reporter function lists the proportion of thumbnails that have been pre-built: In the Tree, open Services & Plugins > Reporter to check it.
Disk Access Issues
Media Center depends on being able to read the media files from disk quickly enough to render them for playback in real time. If MC cannot get the media file fast enough, it cannot play the media file. If you have constant skipping, buffering, or other playback related issues, you may be suffering from disk access or latency issues. This is particularly true for external disks, such as USB drives.
If you are having trouble with stuttering playback, buffering, long freezes when starting or seeking around in files, or the files abruptly stopping mid-playback (with or without an error), the most common explanation is a disk access issue.
The most common way that Antivirus applications interfere with performance is with disk access issues. The way realtime anti-virus protection works is by intercepting all system disk read and write accesses, and routing them instead through the security package first, so that it can run its algorithm and try to decide if the access is safe or not.
This does impact performance. Whether it causes problems depends on a range of factors and can change over time, without warning, as the application interacts with:
- New definitions updates
- New OS patches
- Hardware changes (including disks filling up)
For more information on diagnosing and solving issues related to security software, refer to:
Try a Different Disk
If you aren't sure if disk access issues are causing your trouble, the simplest way to test it is to copy some of the files to a different disk, and try to play or use them from that disk. Especially if you have an SSD as your OS drive, copy a few files over to it temporarily, and test it out. This should show immediately if the performance issues you are encountering stem from disk access issues.
Investigate Possible Connection Issues
- Replace the data cable that connects the computer running MC to the disk storage. This could be a USB cord, an eSATA cable, or an ethernet cable. Cables can be damaged, and even if the proper signal does get through (due to error correction) this can cause all sorts of latency and disk access issues. Replace the cable, as a test, to see if the issue goes away.
- Make sure you are using the right class of cable. If you have a USB3 disk, and it is connected using a USB2 cable (or a very old, or cheap USB1 class cable) then you will not get full speed access to your disk.
- Test the speed of your disk with a disk benchmark tool such as IOMeter or HD Tune. Write speed performance will primarily impact the disk where you store your Library (especially random write performance), but both sequential and random access performance can impact media playback issues.
- Try a different port on your computer. Switch from a USB3 port to a USB2 port, for example, of from USB to eSATA if available. If your computer has different external ports driven by different internal controllers, you may see performance differences depending on the interaction of your particular OS, external device, drivers, and controller hardware. For example, sometimes, USB3 ports (especially early ones before it was integrated into the CPU) perform much more poorly for media playback purposes than older, more stable USB2 ports. Or perhaps the USB controller in the drive itself is less potent than the eSATA controller. If you have other options, switch them around and see what happens.
- Power supplies of consumer external disks often fail. In many cases, the mode of failure is constant mini "brown outs", or lowered voltage, which will impact the performance of the disk. In some cases, this impact can be extreme (as the disk spends most of its time "resetting and restarting" before it can read any data). Often, you can replace these power supplies with "universal" power supplies from electronics vendors, or purchase replacements from the vendor of the disk.
- If you have long, frozen, pauses before the files start playing, but then once started they play fine, your drives may be sleeping and need to spin up before data can be delivered. You may be able to alter this with OS settings depending on the OS and the device in question.
- Spinning disks do not perform uniformly across their surfaces. Many performance characteristics alter depending on where the surface of the disk the data is located. This can dramatically impact the read and write performance of the disk as the disk fills up (even if it is not fragmented). If your media storage device is very full, you may have performance impacts that could affect just some files on the disk, or across the entire volume.
- Also, with modern high-density magnetic media, drive mechanisms spend most of their time moving the heads around and seeking, before they even start reading data. This is particularly true for relatively small, sequential reads like music files or images. If the disk is busy with other tasks, such as a background backup or cloud sync task, this can severely impact performance. That's because the drive head will be constantly flying back and forth, trying to satisfy all of the demands at the same time. See if anything else is running that might be accessing the same disk.
- Fragmentation is less of a concern than it once was, as all major current operating systems will automatically defragment spinning disks as they are used. However, it is worth checking to see if your disk is heavily fragmented if you are seeing otherwise unexplained performance issues (especially if they change over time).
When a copy of Media Center is connected to a remote Library Server, it can access the files in one of two ways: directly or streamed. By default, MC will directly access the files (on a file share, or local disk) whenever it finds an accessible filename matching the one "seen" by the server. In this case, the client plays the file just as the server would, directly from disk.
If a matching file is not available, then the server will stream the file to the client via HTTP. Depending on the file type, and speed of the connection between the Client and Server copies of MC, this can either work perfectly, or cause latency issues in playback.
Streaming latency issues will typically manifest with pauses and freezing when starting playback, and when seeking within the files. If possible, you'll have better performance if the client can see the files directly. This is particularly true when connecting to the server over a low-bandwidth connection (like from the Internet). If you need to stream files, you may be able to improve performance by adjusting the client's conversion settings under Tools > Options > Media Network > Client Options.