October 13, 201213 yr I have been noticing whenever i play a movie that is stored on unRAID that it takes a long time for it to start (10-15 second) if the disks are spun down. I actually went into the room where my server is today and tried playing a movie and noticed that when i clicked play 1 disk would spinup, then after a couple seconds another, then after a couple seconds another, etc. finally when all were spun up the movie would start to play. So does unRAID know which disk a file on a user share is on? Should it have to spin up all disks to open a file? Also, I do not have spinup groups enabled.
October 13, 201213 yr The short answer is yes, unraid knows where the file is stored. The longer answer is that under unraid, the data physically resides on one disk and unraid caches the disk tree (inodes) in memory. If the size of the inode table exceeds memory, unraid must spin up each disk to find the file. Once the file is found, unraid will cache that information in the inode table removing less frequently accessed files. I believe the optimal solution is to make sure you have enough ram to accommodate the inode table. If you have a few (15,000) large files (like I do) this isn't a problem. If you have trillions of 1kb files then this is a massive problem for unraid (and really any parity/pooling system).
October 13, 201213 yr Author Thanks for the reply. I have 2GB of memory for unRAID. And 90% of my files are large movie files.
October 13, 201213 yr hmmm Unraid doesn't split files across disks/devices so I'm not sure what's going on. How are you accessing the file? My OpenELEC boxes (NFS mounts) are pretty good about accessing only the files. If the one disk is spun down it can take a couple of seconds to spin up. On Windows, you might want to check your antivirus settings as I've seen laptops attempt to start a recursive folder/file scan when you access a mount (even through XBMC on Windows).
October 13, 201213 yr Although I can't offer any solution for you, in a similar way from hitting play on XMBC (live version) it take 10-15sec to spin up and start playing. It does only spin up the one drive the media is on I've never noticed it spin up several drives. Takes a similar amount of time to launch a file from a windows box access the smb shares so I've never really worried about it. I do run something (i forget its name but could look it up if you wish) which keep a cache of the files/folders so it doesn't need to spin up a drive to browse it, its only when you try to access any actual data from the file the disk spins up
October 13, 201213 yr Author I am using Plex to play my movies, it is pointed at /mnt/user. This particular movie i know was on disk 1. I watched unRAID first spinup every other Disk first then it started Disk 1 and the movie started playing.
October 13, 201213 yr The longer answer is unRAID does not know which disk a movie is on. To locate a file it must search the directory hierarchy until it finds it (or not, if the file does not exist) If the information (disk data blocks) are already in memory representing the directory hierarchy, this occurs very fast and no disks spin up. Unfortunately, the in-memory disk cache is shared with the data blocks of your movies being played. Even if your entire directory structure could fit into memory, the first time you played a movie over 2GB, it would be displaced by the more recently accessed data blocks representing your movie. (You only have 2GB of RAM, and unless you are compressing your movies, most are larger than 2GB) So... unRAID must search the directory hierarchy looking for your file, which means spinning up each disk in turn. I'm sure the logic might be tweaked to stop once the file is located, and I think it is, since when duplicates exist I understand the one on the lowest number disk is the one returned. It is why I wrote "cache_dirs" To frequently access the directory information, to keep it in memory. (to keep it from being the least accessed data blocks holding directory information and being reused as file data is accessed.) Cache_dirs does not help though when pressing play. For that, I wrote a different utility spinup_when_accessed.sh See here: http://lime-technology.com/forum/index.php?topic=5444.msg50676#msg50676 Joe L.
October 13, 201213 yr Also check your Spinup groups. I couldn't explain why certain disks were spinning up (I use Joe's cache dirs script) and one day noticed that the spinup groups were set in what seemed a pretty random manner.
Archived
This topic is now archived and is closed to further replies.