Jump to content

Sometimes very slow build up during first start


MikeyMan

Recommended Posts

MikeyMan

Hi all! 

I notice some huge delays recently. Take quite a long time to build up the home screens. 
It seems to be limited to two of the three folders i have in the libary. 

First thought it was down to the LG app. But when i login to the web interface i see the same behavior. 

Strangely enough all works very quickly afterwards. Just seems to be initial build up.

First login:

image.thumb.png.5e3c8f7a13e51fdc63a7ad2f93f73791.png 

After one minute +:

image.thumb.png.8b20ca02bd1cba26db348246745f2574.png

 

Logs without debug:

embyserver.txt

Anything else i can do to check??

Just turned it on for later.

 

Link to comment
Share on other sites

seanbuff
54 minutes ago, MikeyMan said:

Anything else i can do to check??

When was the last time you vacuumed your database? 

Also, if you have ample RAM - you might want to tweak your DB cache size -- see this tutorial: 

 

  • Like 1
  • Agree 1
Link to comment
Share on other sites

seanbuff
26 minutes ago, MikeyMan said:

you mean delete stuff?

Not at all. Read the note about "vacuum" in the screenshot of that link.

  • Like 1
Link to comment
Share on other sites

MikeyMan

Ah yes, was just working through that.

DB size is 272281600, so that's roughly 260mb.

After vacuuming its 199626752, so roughly 190mb. So that's a nice 30% decrease.

I've upped the cache to 400mb. Lets see how that goes.

Edited by MikeyMan
  • Like 1
Link to comment
Share on other sites

MikeyMan

Seems to be a lot quicker after some tests!

Might i ask; why not schedule the vacuum weekly or monthly?

Link to comment
Share on other sites

Happy2Play
1 minute ago, MikeyMan said:

Might i ask; why not schedule the vacuum weekly or monthly?

There will be a schedule task in 4.8 but it will just enable the flag but still requires you to do a restart.

Link to comment
Share on other sites

MikeyMan
3 minutes ago, Happy2Play said:

There will be a schedule task in 4.8 but it will just enable the flag but still requires you to do a restart.

Could also be scheduled of course ;)

Link to comment
Share on other sites

Happy2Play
2 minutes ago, MikeyMan said:

Could also be scheduled of course ;)

True with a scripted api call or the Restart plugin.

Link to comment
Share on other sites

MikeyMan

Ok, just started the TV again, and not impressed with the improvement tbh. Will post debug log tomorrow.

Link to comment
Share on other sites

Q-Droid

Is that SSD or HDD? Emby perf can benefit when internal files (db, cache, metadata) are on SSD. The DB cache settings will help queries though the files still have to be fetched and transferred. So the faster the better.

There's also a library setting to download images in advance but to be honest I don't know exactly which images this affects and whether your problem is from fetching them on demand from the source. 

Link to comment
Share on other sites

Q-Droid

Is it still taking minutes to load? HDD alone wouldn't cause it to be that bad. The difference would be sluggish (HDD) vs snappy (SSD). If it's still very slow on multiple clients then gotta keep digging. 

Link to comment
Share on other sites

There are some things that only get loaded once, so yes, it is possible that performance will improve after some internal caches start building up. Did you try adjusting the database options?

Link to comment
Share on other sites

Happy2Play

Yes I see you changed your db cache size to 400. 

Not sure where the metatata delete is coming from.

Lines 304 thu 123217 in embyserver-63813916800.txt

But look like you have having a DLNA issue also.

2023-03-08 21:11:45.915 Error App: Error sending socket message from 0.0.0.0:1900 to 239.255.255.250:1900
	*** Error Report ***
	Version: 4.7.11.0
	Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology7_{version}_x86_64.spk -noautorunwebapp
	Operating system: Linux version 4.4.180+ (root@build2) (gcc version 8.5.0 (GCC) ) #42962 SMP Fri Feb 10 16:34:59 CST 2023
	Framework: .NET 6.0.8
	OS/Process: x64/x64
	Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll
	Processor count: 4
	Data path: /var/packages/EmbyServer/var
	Application path: /volume1/@appstore/EmbyServer/system
	System.Net.Sockets.SocketException: System.Net.Sockets.SocketException (101): Network is unreachable
	   at Rssdp.SsdpCommunicationsServer.SendFromSocket(Tuple`3 socketTuple, Memory`1 messageData, IPEndPoint destination, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void Throw()
	

There appear to be long response times for Latest and Resume but not as described above.

2023-03-08 20:51:20.124 Debug Server: http/1.1 Response 200 to host3. Time: 1459ms. http://10.0.0.4:8096/emby/Users/ddee606b06d84b2ea80c7133307a4d1b/Items/Latest?Limit=16&Fields=BasicSyncInfo,CanDelete,Container,PrimaryImageAspectRatio,ProductionYear,Status,EndDate&ImageTypeLimit=1&EnableImageTypes=Primary,Backdrop,Thumb&ParentId=9&X-Emby-Client=Emby for LG&X-Emby-Device-Name=LG Smart TV (OLED55C9PLA)&X-Emby-Device-Id=3e8b1687-9be9-420a-8618-5bf57cc14bc8&X-Emby-Client-Version=1.0.37
2023-03-08 20:51:20.128 Debug Server: http/1.1 Response 200 to host3. Time: 1468ms. http://10.0.0.4:8096/emby/Users/ddee606b06d84b2ea80c7133307a4d1b/Items/Resume?Recursive=true&Fields=BasicSyncInfo,CanDelete,Container,PrimaryImageAspectRatio,ProductionYear&ImageTypeLimit=1&EnableImageTypes=Primary,Backdrop,Thumb&MediaTypes=Video&Limit=12&X-Emby-Client=Emby for LG&X-Emby-Device-Name=LG Smart TV (OLED55C9PLA)&X-Emby-Device-Id=3e8b1687-9be9-420a-8618-5bf57cc14bc8&X-Emby-Client-Version=1.0.37

But devs will have to comment more.

Link to comment
Share on other sites

15 hours ago, MikeyMan said:

Ive turned on debug logging, hope these are the right files.

embyserver (1).txt 52.85 kB · 3 downloads

embyserver-63813916800.txt 15.92 MB · 3 downloads

 

@Luke I understand, but it never was so slow as it is recently. I havent added much more shows/movies in the recent months. So thats why i think something might be wrong here.

Have you configured the library scan to run when starting up the server? If you have, then you may want to undo that if it's  impacting performance.

Link to comment
Share on other sites

MikeyMan
10 hours ago, Happy2Play said:

Not sure where the metatata delete is coming from.

Don't know either. Didn't delete anything manually.

 

10 hours ago, Happy2Play said:

There appear to be long response times for Latest and Resume but not as described above.

Strangely enough the Resume category shows up first. Well before the rest of the content.

 

10 hours ago, Luke said:

Have you configured the library scan to run when starting up the server? If you have, then you may want to undo that if it's  impacting performance.

Don't think so. These are the schedules:

 

image.png.249f755cf72f9100e9ad8f5c0b431a53.png

I only restart the NAS when an update needs it to. 

Link to comment
Share on other sites

RobsterUK
On 08/03/2023 at 09:36, seanbuff said:

When was the last time you vacuumed your database? 

Also, if you have ample RAM - you might want to tweak your DB cache size -- see this tutorial: 

 

Sorry to hijack the thread.
The title drew me in as I have noticed a delay in app loading times in recent months.
It has been taking longer to display the library items and home screen in all apps (Theatre for Windows, LG app, Web app, Android app).

My library DB was 200MB. I ran the 'vacuum' option and restarted. This reduced the DB to 180MB.
I then increased the RAM from the default 96MB to 380MB. Restarted the server again.
All apps are responding much faster with the initial loading times & generally feel more zippy.

Thanks for posting this.

@MikeyManI hope you get your issue resolved 👍

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...