BrianSDX2 3 Posted March 30, 2022 Posted March 30, 2022 I was wondering if there were plans in the pipeline for the EmbyServer.exe process itself to support multi-threading on multi-core CPUs. I have two Xeon 2697v2s in my server which is nice for things that can use more than one core at a time. The problem is a single core is limited to 3.0GHZ and is a bottle neck when you can't use more than one core. I have a decent amount of content on my main emby home screen and in order to load that page it takes about 7 to 10 seconds and it also maxes a single core to 100% in doing so. The slowdown is 100% the latest media section. Thank you
Luke 42078 Posted March 30, 2022 Posted March 30, 2022 Hi, emby server is already a multi threaded application. Please go over an example. Thanks.
BrianSDX2 3 Posted March 30, 2022 Author Posted March 30, 2022 Of course. To load this page Emby will only use about 3.0% of my CPU for 7 to 10 seconds. If it could use more than 3% this would happen almost instantaneously. Maybe this isn't a multi-core issue but a optimization issue for users that have large home pages. This is my fully loaded main page. Notice the scroll bar.
rbjtech 5284 Posted March 30, 2022 Posted March 30, 2022 (edited) I'm sure the 'bottleneck' is going to be local disk reading all the thumbnail images. Is your Emby cache on an SSD drive ? Using tools such as ProcessMonitor (from sys internals - part of Microsoft) will allow you to view in real-time what is being used on your system. It will for example show you all the I/O that is happening when you load your web page - and you can see from the timings where the delay is - I suspect it's I/O rather than CPU. As an example - I cleared my my browser cache and then re-loaded my home page - you can see an extract from it here (filter by embyserver.exe) and it shows it loading .js and .css files but the main I/O is all the cached images. Timings on the side show the action - mine took from 15:24:32.149 secs to 15:24:34.648 - ie ~ 2 seconds - that's 4,430 events (!) - but from an NVME SSD, so it's pretty fast. This is only a single PID though - so I'm not sure if this action is multi-threaded - I don't think it is ... ? Edited March 30, 2022 by rbjtech
Happy2Play 9780 Posted March 30, 2022 Posted March 30, 2022 Have you tried adjusting database cache size? On 4.6 it is in the system.xml, 4.7 will have it in the UI.
BrianSDX2 3 Posted March 30, 2022 Author Posted March 30, 2022 (edited) I went down that path myself when I was troubleshooting and set up my Emby to use a ramdisk in testing which did not net me better results. It was just the same 3% of the CPU being used.The SSD that Emby lives on is a Samsung 860 Pro. I did adjust the DB cache size as well because I thought this was a database issue at first. Edited March 30, 2022 by BrianSDX2
rbjtech 5284 Posted March 30, 2022 Posted March 30, 2022 ok - so may I suggest using Process Monitor then to see where the delay is - realistically there is no other way to do this... It may highlight a delay after loading a css for example.
BrianSDX2 3 Posted March 30, 2022 Author Posted March 30, 2022 Unfortunately I cannot run Procmon on this system, It throws an error when I open it. "unable to load the process monitor device driver". I did however capture a Har file to show exactly what the browser is doing with the requests. It does show the delay in pulling content for the Latest sections. Please see attached. localhost_Archive [22-03-30 11-29-57].har
BrianSDX2 3 Posted March 30, 2022 Author Posted March 30, 2022 A har file is an export of a page load including times. You can open it in any web browser and view it with dev tools.
rbjtech 5284 Posted March 30, 2022 Posted March 30, 2022 ok thanks - clearly some high load times there.
ebr 16184 Posted March 30, 2022 Posted March 30, 2022 2 minutes ago, Luke said: do you have a large number of libraries? Based on the requests he showed, at least 16.
BrianSDX2 3 Posted March 30, 2022 Author Posted March 30, 2022 That is correct. I have a lot of content. I wrote a PowerShell script to import my iptv providers content into my emby library with the use of strm files. In order to see the most recent content through added through the provider I use the latest added sections.
JackBowman 35 Posted March 31, 2022 Posted March 31, 2022 Wow! Adjusting database cache size really sped things up for me. I have 32 Gigs in a windows 10 Pro that I am using for a dedicated server. I set it to 256 via the system.xml edit, rebooted and went in and out of the App several times and BOOM! Thank you for this! My Roku Ultra just screams through the Emby app now. 1 1
thelanranger 11 Posted February 8, 2025 Posted February 8, 2025 So, I happened on this thread and at the risk of resurrecting a necro I was wondering if @JackBowmancould explain exactly what he did because I am in a similar situation. I also run emby on a dual xeon and i'm planning an upgrade. I was curious if you were allocating 256gb of ram for your DB here? I have a very large music collection and generally a lot of content (over 40gb and growing) and I'd like to plan everything with this build and correct this current issue.
JackBowman 35 Posted February 9, 2025 Posted February 9, 2025 You can now adjust this in the settings on your Emby server. You will find it under the "Database" header in the left column. That being said I think it defaults to 1024 by default. The setting does not represent gigabytes, but rather megabytes. This would make it 1gb in size. Hope this helps. Jack
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