LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This 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


Reply
  Search this Thread
Old 02-03-2016, 03:47 PM   #1
Macster999
LQ Newbie
 
Registered: Jan 2016
Posts: 2

Rep: Reputation: Disabled
Question 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.

Thanks for your insight
 
Old 02-03-2016, 05:54 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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?
 
Old 02-04-2016, 01:55 PM   #3
Macster999
LQ Newbie
 
Registered: Jan 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.
 
Old 02-04-2016, 05:29 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
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
 
Old 02-04-2016, 07:26 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
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.
 
Old 02-08-2016, 07:53 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 02-10-2016, 02:36 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Improve system performance by moving your log files to RAM Using Ramlog LXer Syndicated Linux News 0 02-06-2015 05:11 PM
Disk performance slower after upgrade to 4GB RAM. Help. dbrazeau Linux - General 5 10-19-2010 04:18 PM
LXer: Improve system performance by moving your log files to RAM LXer Syndicated Linux News 1 07-21-2008 10:30 AM
Have i tried everything to improve my disk performance? drben Linux - Hardware 15 02-07-2006 02:38 PM
ram disk problem with loading Mandrake (stage 2) OrganicOrange84 Linux - Newbie 1 08-11-2004 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration