nagetech 66 Posted February 12, 2021 Author Share Posted February 12, 2021 (edited) So I tried vacuuming the database, so I made sure the line said True (I closed emby first of course) I started it up, and it fired up no difference. I checked the xml file again, and it still showed "true" even though @Luke post said it should have reset to false. Did check the logs, saw nothing about the database getting vacuumed. Did I miss a simple step somewhere? Edited February 12, 2021 by nagetech Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 12, 2021 Share Posted February 12, 2021 Did you exit back out of Emby before you checked the XML file? If it's still showing as true try it again. Worse case do a reboot and see if it worked. If not let us know. It's possible if you have any corruption in the database the vacuum won't be performed. I could remote in with you and take a quick look. Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 15, 2021 Author Share Posted February 15, 2021 I did exit Emby, edit the file, then start Emby up again. No change. Is there a different way to vacuum the database? This installation is only about a month old, so be interested to see if that helps. Updating my observations, I have image extraction to only run at the default scheduled time, no longer on import. Emby seems to run fine all day, after the night time tasks run (library scans, thumbnail image extraction, refresh people) that is when Emby starts being laggy. It appears like the HTTP server is taking a bit to respond, as when it actualy does play the movie, it streams just fine. When a TV show is playing and one episode is done, it takes it a little bit to start the next episode. Now If I restart Emby, it is instantly snappy again and runs great! Hoping for more hints Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 15, 2021 Share Posted February 15, 2021 3 hours ago, nagetech said: Is there a different way to vacuum the database? This installation is only about a month old, so be interested to see if that helps. What OS are you running Emby on? Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 16, 2021 Author Share Posted February 16, 2021 I am running a fresh install of Windows server 2016 Happy Tuesday everyone! Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 16, 2021 Share Posted February 16, 2021 Last question. What does Emby show on the Dashboard for your logs path? Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 17, 2021 Author Share Posted February 17, 2021 C:\Users\USER\AppData\Roaming\Emby-Server\programdata\logs Sorry for the late reply and thank you all for chipping in to help so far! Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 17, 2021 Share Posted February 17, 2021 17 minutes ago, nagetech said: C:\Users\USER\AppData\Roaming\Emby-Server\programdata\logs Sorry for the late reply and thank you all for chipping in to help so far! You log into your computer as USER ? 1 Link to comment Share on other sites More sharing options...
GrimReaper 3330 Posted February 17, 2021 Share Posted February 17, 2021 2 minutes ago, cayars said: You log into your computer as USER ? I reckon that's a placeholder? Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 17, 2021 Author Share Posted February 17, 2021 5 minutes ago, cayars said: You log into your computer as USER ? No lol I changed the username before I submitted the post, I assure you Thanks for pointing it out though! May serve as a lesson or hint to another reader! Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 17, 2021 Share Posted February 17, 2021 (edited) Try this. Unzip the attached zip file to c:\sql or similar. Edit the vacuum.bat file to change the path (CHANGE-ME) to proper location. Shut down Emby. Make a copy of your library.db file which is in the DATA directory under programdata. Run the batch file (DO NOT SHUTDOWN or close the window while it's running) Restart Emby. Vacuum.zip Edited February 17, 2021 by cayars Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 17, 2021 Author Share Posted February 17, 2021 Ah! I didn't realize you were making me a script! Thank you! I couldn't shut down emby right now as a bunch of users are one, BUT I did make a copy of the database and edited the script. Ran it to see the size difference. It went from 927MB to 807MB Damn, This installation is only a month old. I'm not too familiar with databases, but what could have caused the bloat? Thank you for helping out! 34 minutes ago, cayars said: You log into your computer as USER ? No lol I changed the username before I submitted the post, I assure you Thanks for pointing it out though! May serve as a lesson or hint to another reader! Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 17, 2021 Share Posted February 17, 2021 If you didn't shutdown Emby you don't have a valid library.db backup. You can't back this file up while Emby is running because of it's temp files which hold info since Emby started. Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 17, 2021 Author Share Posted February 17, 2021 It was just a test, I know that's not the right way to do it I plan on doing it the right way later tonight when the server is idle. Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 17, 2021 Share Posted February 17, 2021 You got it. For a test run what you did will work just fine. I just wanted to make sure you knew it wasn't a valid backup of the library.db file. When you do it correctly later, make a good copy. ALWAYS a good idea to have a copy/spare version of this file. It's the lifeblood of Emby. Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 18, 2021 Author Share Posted February 18, 2021 Alrighty! Just ran the command the correct way. Now it's time to see if that was the magic bullet fix! BTW, can you tell me a little bit about how that command helps out? I was surprised to see by how much the database shrank. Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 18, 2021 Share Posted February 18, 2021 Don't know if I'd call it a magic fix but it can help a lot if performance is limited by the DB itself. It's something rather easy to run so it's a good "first step" for performance issues. https://www.sqlitetutorial.net/sqlite-vacuum/ Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 18, 2021 Author Share Posted February 18, 2021 Thanks for that info. It looks like, despite having shrunk the heck out of my database, the performance issue is still there. Emby runs FAST when it's fresh. After I added 7 new movies, had it do the whole scan library and extract image thumbnails, THEN the UI responsiveness slowed down. Clicking on anything, Movie library or just a single movie, takes a perceivable amount of time before it loads. It's like the HTTP server just slows down after it imports bigger files. TV shows I've noticed don't affect it as much. I can confirm when emby starts to slow down, there is NOTHING going on with the server that would cause emby to slow down. Server has plenty of resources and only runs emby/sonaar/radaar on there. Thanks so far for all the help and the awesome script though. Going to add that to my monthly toolbox for maintenance. Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 18, 2021 Share Posted February 18, 2021 Adding 7 movies should be almost imperceivable. Adding hundreds to thousands on the other hand can take a noticeable hit that a vacuum can help with. When you perceive these speed difference what client are you using? It's not theater or a browser running on the server is it? If so do the checks from a different computer or client as you're competing for resources on the server otherwise. Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 18, 2021 Author Share Posted February 18, 2021 Usually when I see the issues, I notice them first on the firesticks. There is a lag between navigating the menu selections. When going to the Movies list, it does take it a bit to show it. Now I under having about 9500 movies in there takes time, but, when emby is first launched, that menu shows up fast. After the previously mentioned conditions I stated, then the lag shows up. Same things happen on my iOS devices, browser clients, and remote clients. The fix is always a restart of emby server. Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 19, 2021 Share Posted February 19, 2021 Curious, what do you consider LAG? Are you talking about 2 or 3 second delay entering a new library or 10 seconds? Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 19, 2021 Author Share Posted February 19, 2021 I've counted between 10-15 seconds in lag, especially on my fire sticks, but across all my clients. Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 19, 2021 Share Posted February 19, 2021 Can you provide a server log we can take a look at? Link to comment Share on other sites More sharing options...
nagetech 66 Posted February 19, 2021 Author Share Posted February 19, 2021 No problem @cayarsI sent you a PM with the logs Link to comment Share on other sites More sharing options...
Carlo 4331 Posted February 19, 2021 Share Posted February 19, 2021 On 2/16/2021 at 3:59 AM, nagetech said: I am running a fresh install of Windows server 2016 Got you logs and looked at them and you have very high times listed for many different things from database retrieval to pulling info from meta-providers. One call can be 20ms while the next is 8 seconds. Is Emby running on pure metal? What else do you have running on this machine? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now