Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I'm using lighttpd on a server that has a very slow video streaming despite other resources load fine, i've tested httpd but still same issue, what could the problem be ?
Hello, I'm using lighttpd on a server that has a very slow video streaming despite other resources load fine, i've tested httpd but still same issue, what could the problem be ?
Since you provide no useful details AT ALL, how can we even guess?? You don't say what you're streaming, how many users, where the data is coming from, what kind of connection it's running over, to what kind of client, using what kind of player, using what version/distro of Linux, lighthttpd, or httpd.
There could be any of a hundred different problems that could cause this.
I'm streaming flv videos with jwplayer, centos 6.5, lighttpd 1.4.35, about 700 http connections, data comes from the same server hard disk
Ok, that's some of the details...again, what kind of connection are the clients having? Internal (at a company), or external (internet)? What speed is the NIC on the server? Are these 700 CONCURRENT connections, or spaced out over the day? How big are the videos?
All of these things factor in...as does what the web page itself is written in. Do some basic troubleshooting first....put ONE of the FLV files on another server on the same network, with a simple web page that does nothing but serve up that one file. Hit it with a client, and see how fast it loads. If you get similar speeds, then you know it's network related...if you DON'T, you know the problem is on your server.
However...jwplayer and a SINGLE DISK for 700 users could be two HUGE factors.
They are on the Internet, NIC speed is 1000Mb/s, the connections are concurrent and the average size of videos is about 150-200 Mb.
Pages are written in php but the site itself works fast, I can't test on another server because I have no access to the network.
They are on the Internet, NIC speed is 1000Mb/s, the connections are concurrent and the average size of videos is about 150-200 Mb.
Pages are written in php but the site itself works fast, I can't test on another server because I have no access to the network.
Ok, so that's a bit more detail. But are you saying you have a SINGLE 1GB NIC, serving 700 users 150MB videos off ONE HARD DRIVE? 700 users randomly pulling 150MB videos off one hard drive is going to bottleneck right there....and pipe them all over a SINGLE 1GB NIC, and you make it even slower.
Yes, the rest of the site may be 'fast', but you need to think about what you're doing. You're shoveling a few kb of text and maybe a 100kb graphic or so...that will be MUCH faster.
Again, you need to do some troubleshooting...if you don't have any access to the network, there's not much we can help you with there. And you also need to examine how you have jwplayer set up...how much of the video is it caching before playing starts? Spread the videos out onto additional spindles (or better, onto another server on a different network), and try to use some sort of load balancing. Also, you still don't say how the clients are connecting...if these people only have a slow DSL connection, they will have slow speed. Back to basic troubleshooting...can you go to a KNOWN fast connection on the Internet, and try it from there? If you don't have a problem, then there's nothing much for you to work on...your clients need faster connections to get faster speed.
You seriously need a SAN or a tuned JBOD array to do this correctly - I notice now that Tb0ne mentioned this.
OR,.. depending on the number of videos, you could cache them in ram and serve them from there. On a typical 16G server you would be able to cache like 150 of them. Is this something that would be useful?
There are 700 concurrent connections but users aren't more than 200, I don't know how clients are connected I test it from my fast Internet connection and I tought it was a problem of lighttpd bad configuration.
I can't cache videos on ram because they are too many.
You should benchmark your disk and network I/O performance, then do some load testing on the box. With some concrete numbers you will be able to tell whether this is a hardware or software bottleneck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.