eraser8 55 Posted November 13, 2017 Posted November 13, 2017 (edited) Hi guys. I would like to know if there currently have a kind of home page buffering system? The reason I ask this is because I always found that the home page is "taking an eternity" to load. I put this between " because in fact, normally it took around 5 seconds to load. It is important o mention that it is only when the server was idling for a long period (couple of hours). For example, when I wake up on the morning, trying to go on emby(web), it took around 5 second to load the home page. But if I go under movies and come back to home page, it is instantly loaded. Moreover, when I first load the homepage, I can ear my hard drives in my server scratching a lot to load all needed infos. I just think that these infos could be buffered in memory to always have instant access to the homepage. This would be a good performance improvment!! Thanks P.S. I run on Freenas emby server V 3.2.33 Edited November 13, 2017 by eraser8 1
mastrmind11 722 Posted November 13, 2017 Posted November 13, 2017 I think you mean caching, and it already does this.
eraser8 55 Posted November 13, 2017 Author Posted November 13, 2017 I think you mean caching, and it already does this. Yes caching is the right term. Sorry! If it already exist, maybe it can be improved?
Luke 42085 Posted November 13, 2017 Posted November 13, 2017 If you're having an issue, please attach the information requested in how to report a problem. Thanks !
eraser8 55 Posted November 13, 2017 Author Posted November 13, 2017 If you're having an issue, please attach the information requested in how to report a problem. Thanks ! Hi Luke, First, I'm not considering this like an issue. I just talk about that for kind of improvment. But I'm willing to give whatever you need to figure out what should be improved!. Is the server log will be enouth for that? Do you need something special? I need to wait couple of hours before reproduce it... Thanks
dcook 299 Posted November 13, 2017 Posted November 13, 2017 Do you have your metadata stored with your Media? And is your Media on a NAS drive or another hard drive? Those will cause slowness in loading the home page and browsing the library.
eraser8 55 Posted November 13, 2017 Author Posted November 13, 2017 Do you have your metadata stored with your Media? And is your Media on a NAS drive or another hard drive? Those will cause slowness in loading the home page and browsing the library. Hi dcook, Yes I save the metadatas in folders with folder picture, etc.. I'm running a standalone FREENAS server with 4 local harddrives in raids (0 and 1). So, no special delay here. But when I open the homepage, I can listen my HD working hard during 5 seconds. Thanks
bfir3 117 Posted November 13, 2017 Posted November 13, 2017 (edited) I've been thinking about something like this for a while now, but I've been unsure if I'm the only one that has the slow home page load issue. The data that the server returns for the homepage could easily be cached and updated every 5 minutes (or simply whenever data is changed). There is no reason for these simple requests to take so long, especially since the majority of the requests are probably returning identical or very similar data. I've never understood why the server has such a difficult time with these queries, but as @@eraser8 says, if the data was cached there would be no processing delays and the problem would be resolved. I don't see how this could be harmful. Just move whatever is doing the work to display the homepage data to a cache provider that updates periodically or is updated based on triggers and have any service calls for the homepage data return data from the cache instead of processing it on demand. Imagine a situation where 10 users access the server at the same time. Doesn't it make more sense to simply provide a single set of cached data to all 10 users than to process the data entirely for each individual home page request. Do you have your metadata stored with your Media? And is your Media on a NAS drive or another hard drive? Those will cause slowness in loading the home page and browsing the library. But should it cause slowness in accessing the homepage? Realistically the homepage data should always be readily available. It's not very much data for the server to handle, and doesn't need to be processed in real time for each request. That is completely overkill. Edited November 13, 2017 by bfir3
eraser8 55 Posted November 14, 2017 Author Posted November 14, 2017 Hi guys, I took a server log tonight with a good example of the delay I have on homepage. It does seems to came from the SQLite: 2017-11-13 21:25:00.029 Debug SqliteItemRepository: GetItemList query time (slow): 4304ms. Query: select type,data,StartDate,EndDate,ChannelId,IsMovie,IsSports,IsKids,IsSeries,IsLive,IsNews,IsPremiere,EpisodeTitle,IsRepeat,CommunityRating,IndexNumber,IsHD,Name,Path,PremiereDate,ParentIndexNumber,ProductionYear,OfficialRating,RunTimeTicks,DateModified,guid,ParentId,Audio,ExternalServiceId,IsInMixedFolder,TrailerTypes,PrimaryVersionId,Album,CriticRating,IsVirtualItem,SeriesName,SeasonName,SeasonId,SeriesId,ProviderIds,Images,TotalBitrate,ExtraType,Artists,AlbumArtists,ExternalId,ShowId,OwnerId from TypedBaseItems A where IsFolder=@IsFolder AND IsVirtualItem=@IsVirtualItem AND MediaType=@MediaTypes AND (TopParentId=@TopParentId) Group by PresentationUniqueKey ORDER BY DateCreated DESC LIMIT 80 2017-11-13 21:25:00.031 Info HttpServer: HTTP Response 200 to 192.168.11.50. Time: 4306ms (slow). I put the log part in attachment because the whole log was too heavy. I think you have all what you need in it. Server logs - Freenas 3.2.33.txt
bfir3 117 Posted December 4, 2017 Posted December 4, 2017 What's the word on these kind of slow queries.
Luke 42085 Posted December 4, 2017 Posted December 4, 2017 Have you provided a server log with some examples? thanks.
eraser8 55 Posted December 4, 2017 Author Posted December 4, 2017 Have you provided a server log with some examples? thanks. Hi Luke, Yes, please see post #9 Thanks
Luke 42085 Posted December 4, 2017 Posted December 4, 2017 Hi Luke, Yes, please see post #9 Thanks Can you please attach a log from the beginning, when the server starts up? thanks.
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