Network DB extremely slow

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Network DB extremely slow

Post by James.P »

Hi guys,

I've been searching for a while and can't find anything on these forums that fixes my issue. Here's what's happening:

First, the setup. I use 2 Win7 PCs (1 64 bits and 1 32 bits if that makes a difference). One is an HTPC (Atom based) and the other my regular machine (AMD Phenom II X6, 8gb DDR3, SSD main drive). MM version is 4.0.3.1476 on both computers. MM library contains 22700 files (213gb), about 50/50 FLAC and MP3.
Both PCs are wired into a gigabit network to which is also attached a D-Link DNS-323 NAS. I keep all the media files on the NAS, including the music. Back when I was on MM3, I migrated my MM database to the NAS and edited the .ini files with the new path, and everything worked perfectly, pretty much until I updated to MM 4.
Since then, I've been having terrible slowdowns in MM - every time I try to open an artist (to see what albums that artist has), I'll get the spinning wheel and it takes about 3-4 minutes to open. Same thing if I try to open up a different node than artist (Location, Genre, etc..). Another 3-4 minutes during which MM is unresponsive. It will do it repeatedly even if I try expanding an artist that I *just* expanded and closed back so it's not like it's caching anything.
The program doesn't crash, it eventually opens whatever I was trying to open but this is making library/playlist editing pretty much impossible.

I've tried the File > Maintain Library > Optimize Database (Complete) option but to no avail. I get the spinning wheel for maybe 15 minutes, when it appears done I click on Ok but the problem is still there.

I don't know of any other fixes... music plays just fine, without lag. Track tagging works fine, as does auto-organize. My NAS is functional and used regularly for other purposes - I could understand a few seconds delay when the drives are being woken up but this is happening all the time, even if the NAS is in use. Network speed is plenty fast (I can stream HD video) so I don't think it's an access speed issue...

Any help would be hugely appreciated!
Lowlander
Posts: 58342
Joined: Sat Sep 06, 2003 5:53 pm

Re: Network DB extremely slow

Post by Lowlander »

Optimizing the DB is what is suggested, it also not recommended to use the DB over the network as significant read/write is required which can be slow over the network.

You could see if the NAS has a way to defragment the database file itself and make sure it has sufficient free space.
James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Re: Network DB extremely slow

Post by James.P »

Thanks for your reply.
I don't understand how 'it is also not recommended to use the DB over the network' - what's the point of having a detailed guide on how to create a networked DB if it's not recommended?
And what would be recommended as a solution for using MM with multiple clients on the same home network without having to mirror DB changes all the time? Ie: if I edit a playlist on my PC I'd want that change to appear in my HTPC's MM, no have to redo it on the HTPC. Surely that's something that can be done with MM?? I don't believe I'm the only person that wants a setup like that.
The NAS is less than 50% full so that shouldn't be an issue. I'll look into having the NAS defrag de DB file though I don't recall that feature being on the d-link nas admin page.

I'm totally open to any suggestion that would involve modifying or even completely changing the way it's currently setup if it's not optimal. I just want it to work as it did on MM 3.
Lowlander
Posts: 58342
Joined: Sat Sep 06, 2003 5:53 pm

Re: Network DB extremely slow

Post by Lowlander »

It isn't recommended as networks are slower than local drives, but that doesn't mean it doesn't work. You experience this slowness, not a failure. This will become more noticeable as you increase the database size (more files and more data on files).

MediaMonkey 4 is supposed to be faster than MediaMonkey 3 in which I read that database access has been optimized. I don't know why, after doing a complete optimization, MediaMonkey 4 is slower and must admit that over the last week mine, with local DB, has become very slow too. You can submit debug logs (step 4b) for specific slow scenarios: http://www.mediamonkey.com/forum/viewtopic.php?f=7&t=69

You don't need to share the DB if you only edit on one PC. In that case you can setup DLNA instead.

I don't know about NAS defrag, so you may want to contact the manufacturer to see if this is possible. Also be aware that simultaneous access to the DB from multiple PC's can be a problem (SQLite isn't really designed for this).
James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Re: Network DB extremely slow

Post by James.P »

What I find weird is that it used to work so well under MM 3, so something must have changed in the way that MM queries or interfaces with its DB file which makes it untenable under version 4. My DB size hasn't increased much over the last year (1-2k tracks out of 20k+) so it's not proportionate to the slowdowns I'm seeing.

I'll submit a debug log tonight when I'm home.

How would I go about setting up DLNA? I don't really edit on my HTPC (using a Logitech DiNovo Mini keyboard makes it really awkward) even though I like to be able to rate a track (using 1-5 digits on the keyboard) - I could live without that feature though. How would this work?

Thanks again for your help!
forya
Posts: 201
Joined: Sat Feb 24, 2007 1:14 pm
Location: philadelphia

Re: Network DB extremely slow

Post by forya »

I have almost the same setup as you do, the same nas box, 3 pc's (1 vista64, 2 win 7 32 bit). I have 30,000 songs+- and have no speed issues. I just upgraded to mm4 with no problems. Are you using the full path name in your library and your edited mediamonkey.ini file? If you use mapped drive letters instead of the full network path it could be slowing things down. Also If it is only slow the first time you check, It may be the drive spinning up. These drives sleep and power down after periods of inactivity. Try opening some files on your NAS in your my computer before you open media monkey and this will wake the drive before you open MM.
James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Re: Network DB extremely slow

Post by James.P »

forya wrote:I have almost the same setup as you do, the same nas box, 3 pc's (1 vista64, 2 win 7 32 bit). I have 30,000 songs+- and have no speed issues. I just upgraded to mm4 with no problems. Are you using the full path name in your library and your edited mediamonkey.ini file? If you use mapped drive letters instead of the full network path it could be slowing things down. Also If it is only slow the first time you check, It may be the drive spinning up. These drives sleep and power down after periods of inactivity. Try opening some files on your NAS in your my computer before you open media monkey and this will wake the drive before you open MM.
I'm sure it's not the drives spinning up as I've tried it when the NAS was in use. Also, if I expand an artist in MM it'll take 3-4 minutes - if I then collapse it and expand it again right then, it'll still take 3-4 minutes. And if I collapse it and do it again, same thing. So it's not drive access issues...
As for full path name, here's what I put in mediamonkey.ini: DBName=\\NAS\Volume_1\MediaMonkey\MM.DB
Is that a full path name? I'm not that great with networking but I made sure it wasn't by drive letter.
James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Re: Network DB extremely slow

Post by James.P »

I just submitted a debug log so hopefully they can do something or push me in the right direction.

Lowlander- the problem with DLNA (if I understand correctly how it works) is that I don't have a DLNA certified device in my entertainment setup, hence using a Win7 HTPC with MM for music listening purposes. I'm not sure how that would work using DLNA...
Lowlander
Posts: 58342
Joined: Sat Sep 06, 2003 5:53 pm

Re: Network DB extremely slow

Post by Lowlander »

MediaMonkey can be both a DLNA Server and a DLNA Client. So on the HTPC it would function as a Client.
forya
Posts: 201
Joined: Sat Feb 24, 2007 1:14 pm
Location: philadelphia

Re: Network DB extremely slow

Post by forya »

That is a full path name. HMMM I am at a loss, hopefully the smart guys can figure it out with your bug report
Peke
Posts: 18181
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Network DB extremely slow

Post by Peke »

Can you do a small test?
Copy MM.DB to shared location on Non HTPC machine and point HTPC DBname= to that path on shared folder and try Mm speed again?

From what you describe it looks like that bottleneck is showing when both PCs are accessing extensive SQL queries on MM.DB on NAS while also accessing music files.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
James.P
Posts: 15
Joined: Sat Dec 10, 2011 7:47 pm

Re: Network DB extremely slow

Post by James.P »

Peke wrote:Can you do a small test?
Copy MM.DB to shared location on Non HTPC machine and point HTPC DBname= to that path on shared folder and try Mm speed again?

From what you describe it looks like that bottleneck is showing when both PCs are accessing extensive SQL queries on MM.DB on NAS while also accessing music files.
First of all, thanks a lot for the answer and sorry about nudging through the service ticket - I was under the impression that I was subscribed to this thread but I didn't receive a notification about your post... sorry about that!

I did what you asked and sure enough, it seems to work. Obviously the PC on which the DB is now local works like a charm and the HTPC works with minimal lag (well within acceptable range). So I guess that pretty much isolates the NAS as being the culprit.
Here's what I don't get: it used to work just fine with the DB on the NAS under MM3, what changed? Does MM4 handle SQL queries differently than MM3?

Also, the problem would occur even if one or the other PCs were shut down - ie: if the work PC is shut down, the HTPC would still encounter that terrible lag so I don't think it's because of concurrent SQL queries. In fact, I've always been pretty cautious about not opening the DB on both machines at the same time to avoid corruption or query conflicts.

Do you know of anything that can be done on the NAS to handle this issue? My problem with having the DB local on my PC is that it has to be on for the HTPC to access it, which is annoying... the beast is a power hog and I rather keep it off whenever it's not in use.
If there's no way to make it work with the NAS under MM4 it'll take what I can get, it's still much better (read: usable!)... but I'd rather have the NAS serve everything if that's at all possible.

Again, thanks for your help!!

James
Welcome
Posts: 4
Joined: Thu Mar 23, 2006 3:12 pm

Re: Network DB extremely slow

Post by Welcome »

I've had the same problem: started with Version 4, was OK before that. In my case it's useable (1-2 minute delay) and independent of NAS or computer MM.DB server. Music plays perfectly, but responses to pauses, track skips, etc can be very slow. Network is 1 Gb or 100 Mbs wireless and the computer server is high powered (Windows 7 64 bit,18 Gb RAM, 8 cores) an using an internal drive. Don't think it is a hardware problem.

One guess- MM tracks the "Last Played" and possibly other entries that are updated with every play. Maybe the DB access for this is the problem. I don't need it: ***Is there a way to disable this updating?***

For now I will set up a batch file that downloads (before) and uploads(after) MM.DB from the central network location to the local computer at each use. Yukh

Any suggestions would be welcome.
Welcome
Welcome
Posts: 4
Joined: Thu Mar 23, 2006 3:12 pm

Re: Network DB extremely slow

Post by Welcome »

New information on this:

With MM.DB on the network, even a request to change the volume by pressing the volume control button on the keyboard can cause 1 minute hang-ups in the program (music keeps playing, but screen is grayed out and no more control). This, and the other, problems are removed when using a local copy of MM.DB. In all cases, the song files are on the remote NAS.

Does even a request to change volume call MM.DB?
Welcome
Post Reply