Will loading VLC in a RAM disk improve the encoding and Streaming Performance
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
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.
Will loading VLC in a RAM disk improve the encoding and Streaming Performance
I am running VLC with the Dummy interface (no GUI) on a Raspberry Pi2 to multicast the sound from my TV to a mobile app. As i am trying to reduce the delay between the video and the audio, I was wondering if it is possible to move VLC to a RAM disk to do away with the SD card delay.
VLC will be loaded into RAM when it is executed, there is no need to load it into RAM before. Your sync issue lies elsewhere. Is pulseaudio involved in your setup?
I am talking about a RAMDISK where VLC would reside and where all the IO would take place instead of constantly accessing the SD card which has low read/write performance.
I agree with Emerson - you need to be much more clear in what you are asking. And maybe what you understand.
VLC (the program) will be in memory when executing. I just fired VLC up (idle) and lsof showed 1201 entries for it - all memory mapped or socket/stream.
So, if you are doing I/O, you'd better find out what it is. If /tmp (or /var/tmp) and it is on disk, making it tmpfs would be an easy fix if you have sufficient RAM.
If you are swapping, creating a RAMDISK is the last thing you would want to do.
Last edited by syg00; 02-04-2016 at 05:31 PM.
Reason: typo
It would be worth a try to test it. Make a ramdisk and copy the entire vlc and maybe even any dependencies and be sure to point to them all and if it improves any.
I'd think that starting off the test would be to try to find out how resources were used before this test. See where any bottlenecks exist. See where the load is really at.
I would think that it might be faster to put the media file into RAM disk so all this swapping you're talking about can occur. The other part of that problem is that I suspect that VLC would be pulling as much of the file into RAM to be efficient. Therefore reducing your RAM to store the media would then reduce the amount of available RAM for the program to keep it's local copy. What I'm saying is that no matter if you place the media file into a RAM disk filesystem, vlc will still know that it is a non-volatile file system, a.k.a. the original copy and it will cache the media file into local RAM on it's own to be efficient. Still, the actions of moving cache into and out of a RAM disk will likely be faster than moving into and out of cache from a real disk.
I've run ramdisks a lot long time ago. It really does speed up some things. To get maximum effect you'd need to copy any and all files that might be accessed. If the paths are correct and links are correct, no program can tell it is on a ramdisk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.