Jump to content

How to sizing for fund request ?


fathibn

Recommended Posts

Hi,

I have previously requested funds for a server, namely dell optiplex 7050MT with 16Gb Ram and 1To HD, to be used as an emby server onboard of a train.  All this is for a POC as we are still looking for a sponsor.

Now, I didn't yet got this server and i am still filling my emby test server (i3, 16Gb Ram) virtual machine with content @ 720p and noticing really slow content delivery (~450 mp4 titles, 170 Gb) as soon as more than two users connect to the server and some hungs.

So, I started to doubt about my previous spec requested.

 

Assuming, I am serving different content to each user @720p (so approx. 3Mbs/user), that I am using 4 Wifi APs for a total of 1.2 Gb/s bandwidth and a Gigabit Nic on the server. The theoritical limit would be 333 simultaneous users. Assuming each user is viewing a different mp4 file, what would be the recommended spec of such a server ?

 

TIA.

Link to comment
Share on other sites

Guest asrequested

Have you considered that the devices they are using may be part of the problem. What bitrates are the files? Are they transcoding? You probably want to allow for transcoding.....a lot of transcoding. Or use multiple versions of the videos, at different bitrates. Actually, that's probably the better option. Then you could use a Ryzen 7 2700.

  • Like 1
Link to comment
Share on other sites

So my problem is cpu related and not ram related ?

 

Actuallay Ryzen is not an option as a look at major computer vendors websites, here in Tunisia, gives back 0 reults for desktops with ryzen cpu. Also emby will be hosted as a container on kvm based hyperisor with some other VM, so it won't access the cpu directly, but will be given as much vcpu as possible.

 

I have lot of bitrates as I encode with variable bitrates, so here is what I have as bitrates:

 

[root@mediatheque Emby]# find . -type f -iname '*.mp4' -exec /usr/bin/mediainfo {} \; | grep 'Overall bit rate' | sort -u
Overall bit rate                         : 1 005 kb/s
Overall bit rate                         : 1 015 kb/s
Overall bit rate                         : 1 023 kb/s
Overall bit rate                         : 1 030 kb/s
Overall bit rate                         : 1 031 kb/s
Overall bit rate                         : 1 035 kb/s
Overall bit rate                         : 1 044 kb/s
Overall bit rate                         : 1 051 kb/s
Overall bit rate                         : 1 057 kb/s
Overall bit rate                         : 1 058 kb/s
Overall bit rate                         : 1 069 kb/s
Overall bit rate                         : 1 076 kb/s
Overall bit rate                         : 1 080 kb/s
Overall bit rate                         : 1 081 kb/s
Overall bit rate                         : 1 096 kb/s
Overall bit rate                         : 1 103 kb/s
Overall bit rate                         : 1 109 kb/s
Overall bit rate                         : 1 114 kb/s
Overall bit rate                         : 1 115 kb/s
Overall bit rate                         : 1 120 kb/s
Overall bit rate                         : 1 122 kb/s
Overall bit rate                         : 1 148 kb/s
Overall bit rate                         : 1 154 kb/s
Overall bit rate                         : 1 155 kb/s
Overall bit rate                         : 1 178 kb/s
Overall bit rate                         : 1 181 kb/s
Overall bit rate                         : 1 185 kb/s
Overall bit rate                         : 1 221 kb/s
Overall bit rate                         : 1 233 kb/s
Overall bit rate                         : 1 248 kb/s
Overall bit rate                         : 1 324 kb/s
Overall bit rate                         : 1 346 kb/s
Overall bit rate                         : 1 351 kb/s
Overall bit rate                         : 1 403 kb/s
Overall bit rate                         : 1 407 kb/s
Overall bit rate                         : 1 442 kb/s
Overall bit rate                         : 1 457 kb/s
Overall bit rate                         : 1 488 kb/s
Overall bit rate                         : 1 532 kb/s
Overall bit rate                         : 1 560 kb/s
Overall bit rate                         : 1 574 kb/s
Overall bit rate                         : 1 647 kb/s
Overall bit rate                         : 1 666 kb/s
Overall bit rate                         : 1 794 kb/s
Overall bit rate                         : 1 812 kb/s
Overall bit rate                         : 1 815 kb/s
Overall bit rate                         : 1 935 kb/s
Overall bit rate                         : 1 957 kb/s
Overall bit rate                         : 2 015 kb/s
Overall bit rate                         : 2 062 kb/s
Overall bit rate                         : 2 155 kb/s
Overall bit rate                         : 2 160 kb/s
Overall bit rate                         : 2 223 kb/s
Overall bit rate                         : 243 kb/s
Overall bit rate                         : 2 468 kb/s
Overall bit rate                         : 256 kb/s
Overall bit rate                         : 2 698 kb/s
Overall bit rate                         : 305 kb/s
Overall bit rate                         : 3 086 kb/s
Overall bit rate                         : 311 kb/s
Overall bit rate                         : 376 kb/s
Overall bit rate                         : 4 162 kb/s
Overall bit rate                         : 4 476 kb/s
Overall bit rate                         : 542 kb/s
Overall bit rate                         : 579 kb/s
Overall bit rate                         : 582 kb/s
Overall bit rate                         : 623 kb/s
Overall bit rate                         : 645 kb/s
Overall bit rate                         : 661 kb/s
Overall bit rate                         : 693 kb/s
Overall bit rate                         : 712 kb/s
Overall bit rate                         : 729 kb/s
Overall bit rate                         : 747 kb/s
Overall bit rate                         : 761 kb/s
Overall bit rate                         : 765 kb/s
Overall bit rate                         : 777 kb/s
Overall bit rate                         : 778 kb/s
Overall bit rate                         : 785 kb/s
Overall bit rate                         : 792 kb/s
Overall bit rate                         : 810 kb/s
Overall bit rate                         : 821 kb/s
Overall bit rate                         : 837 kb/s
Overall bit rate                         : 852 kb/s
Overall bit rate                         : 853 kb/s
Overall bit rate                         : 872 kb/s
Overall bit rate                         : 875 kb/s
Overall bit rate                         : 881 kb/s
Overall bit rate                         : 887 kb/s
Overall bit rate                         : 891 kb/s
Overall bit rate                         : 892 kb/s
Overall bit rate                         : 896 kb/s
Overall bit rate                         : 897 kb/s
Overall bit rate                         : 898 kb/s
Overall bit rate                         : 899 kb/s
Overall bit rate                         : 900 kb/s
Overall bit rate                         : 901 kb/s
Overall bit rate                         : 902 kb/s
Overall bit rate                         : 903 kb/s
Overall bit rate                         : 904 kb/s
Overall bit rate                         : 905 kb/s
Overall bit rate                         : 906 kb/s
Overall bit rate                         : 907 kb/s
Overall bit rate                         : 909 kb/s
Overall bit rate                         : 910 kb/s
Overall bit rate                         : 915 kb/s
Overall bit rate                         : 917 kb/s
Overall bit rate                         : 919 kb/s
Overall bit rate                         : 949 kb/s
Overall bit rate                         : 965 kb/s
Overall bit rate                         : 970 kb/s
Overall bit rate                         : 978 kb/s
Overall bit rate                         : 980 kb/s
Overall bit rate                         : 984 kb/s
Overall bit rate                         : 996 kb/s
Overall bit rate mode                    : Variable

 

Most users will be using smartphones if this could help yu diagnose my problem.

TIA.

Link to comment
Share on other sites

Guest asrequested

Most of those have very low bitrates, so that's good. 

 

It's difficult to diagnose what the issue is, without logs, not knowing what apps they are using. If they are passengers on a train, are they using DLNA apps? Transcoding maybe happening due unsupported media. If that's the case, you need a lot of resources to keep up. Starting with many logical processors. But you haven't provided enough information.

  • Like 1
Link to comment
Share on other sites

legallink

For your scenario, I would disable transcoding. Given the user size and likelihood of limited power constraints, I would ensure your media is encoded for the most supported formats, namely mp4, 2.0 aac, h264 and go from there. If it is hanging, my guess is that it’s hanging from cpu.

 

Your next issue, after limiting cpu usage, is going to be drive speed and network speed. Serving a potential of 3xx users, a single Gbit NIC connection would struggle quickly. I would be looking for a dual 10GBE connection to your router/switch.

 

Lastly, when serving up that many files, a single 1tb drive will fail quickly.

 

But start with disabling transcoding. Hanging on 2 users is most likely a cpu issue. Once you get in to 50-100 users, that’s when @ will be really helpful.

  • Like 1
Link to comment
Share on other sites

A previous poc failed due to heat/vibration/variable voltage input which broke the motherboard.

So, now we are preparing a new poc. Tests are done with a small set of volunteers, my kids, using a controlled set of devices, namely one samsung A3 lite tablet, two lenovo A2010 smartphones, one iphone 6, one samsung galaxy grand prime+, one lenovo ideapad 110 laptop.

DLNA is disabled and users use only web browsers to view mp4 files.

 

Which logs should i post to help you diagnose the problem ?

Edited by fathibn
Link to comment
Share on other sites

Thank you all for your help.

 

I have started batch transcoding to various mp4, 2.0 aac, h264 video sizes, will also disable "on the fly" transcoding.

 

Fund requests for this poc must be signed by the company ceo as it has not been previously included in the todo list when planning the budget for 2018.

I hope, this poc will have a happy end, so to get the necessary funds for 2019 to extend it to all our trains and have emby serve our 41 million passengers/year.

Link to comment
Share on other sites

Guest asrequested

As vibration is a problem, along with needing quick response on demand, I would recommend not using mechanical drives. Use an SSD.

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

Because this is on a train, potentially how many people might be streaming at any one time?

At peak hours, there will be ~ 1100 person/train (and thus per emby server). How many of these people will connect? this is one of the questions we are trying to answer by this poc.

Edited by fathibn
Link to comment
Share on other sites

Guest asrequested

So a few hundred at time, is a possibility. I'd suggest multiple drives, and as mentioned above, increase server network bandwidth. At least dual gigabit. If you figure each video is 1Mb/s, you could easily choke that, in latency alone. So having more than one line out, will help with that. 

  • Like 1
Link to comment
Share on other sites

legallink

Similar to @ comment, mechanical drives would most likely be impossible. Also, if vibration is an issue, you’ll want to get away from large heat sinks on the cpu as much as possible. I know that shops like kontron and a few others make motherboards for harsh environments, so I would look at those.

 

From a logs perspective, Emby produced logs won’t tell us if your cpu or network is taxed. It will just tell us Emby issues. Make sure you’ve got some monitoring software on the system monitoring cpu usage and then ram, network and disk I/o, as those will most likely be your first failure points, but those don’t matter til you are past your 5 or 10 users at least.

 

On a single 1gb nic with an i5, I could serve up roughly 2 transcoding files or roughly 10 direct streams and the system would remain responsive. Since migrating to an amd 2400g, I haven’t tested it completely but the capacity has doubled at least.

  • Like 1
Link to comment
Share on other sites

 

I have started batch transcoding to various mp4, 2.0 aac, h264 video sizes, will also disable "on the fly" transcoding.

 

I now have many versions of every single mp4 visible with the resolution appended to the file name xyz - [480p], xyz - [720p], xyz - [240p] ... instead of showing only one single title and auto-selection of the correct resolution depending on the device capacity (all devices use html5 viewers, no device specific apps). How can I achieve to have only one single title showing in the Emby catalogue and have the smartphone select the correct resolution or Emby choose the correct resolution to stream to that device ?

Also, not finding from where to disable site-wide transcoding (the lowest value for transcoding threads beeing 1), I have modified the default user profile as shown in the attached screenshot. Is this correct?

5b97d82fda86a_screenshotwwwgooglecom2018

Link to comment
Share on other sites

I now have many versions of every single mp4 visible with the resolution appended to the file name xyz - [480p], xyz - [720p], xyz - [240p] ... instead of showing only one single title and auto-selection of the correct resolution depending on the device capacity (all devices use html5 viewers, no device specific apps). How can I achieve to have only one single title showing in the Emby catalogue and have the smartphone select the correct resolution or Emby choose the correct resolution to stream to that device ?

Also, not finding from where to disable site-wide transcoding (the lowest value for transcoding threads beeing 1), I have modified the default user profile as shown in the attached screenshot. Is this correct?

5b97d82fda86a_screenshotwwwgooglecom2018

 

You can learn about multi-version naming on our wiki:

https://github.com/MediaBrowser/Wiki/wiki/Movie%20naming#multi-version-movies

 

Thanks.

Link to comment
Share on other sites

You can learn about multi-version naming on our wiki:

https://github.com/MediaBrowser/Wiki/wiki/Movie%20naming#multi-version-movies

 

Thanks.

Thanks @@Luke That's what I did, so I ended with mp4 file names like longtitle [720p].mp4 longtitle [480p].mp4 etc. But instead of having only one movie title listed, I had several (one per resolution) identical to the relative filename whithout the mp4 extension.

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...