Video in Qubes 3.2

163 views
Skip to first unread message

ghbouc...@gmail.com

unread,
Jun 29, 2016, 3:33:45 AM6/29/16
to qubes-users
Hi.

I often watch videos offline. I download .mp4 files dans I play them in a dedicated VM (debian template) with MPV.
When I launch a video, the VM CPU goes up to 98%, It is quite strange.

Anyone knows how to fix that ?

G.B

Drew White

unread,
Jun 29, 2016, 3:38:45 AM6/29/16
to qubes-users, ghbouc...@gmail.com
What CPU?
How many threads do you have assigned to the VM?
How much RAM have you assignde to the VM?

If you have memory balancing, how much min and max?

ghbouc...@gmail.com

unread,
Jun 29, 2016, 3:41:49 AM6/29/16
to qubes-users, ghbouc...@gmail.com
Hi.

I'm talking about the VM "virutal" CPU.

> How many threads do you have assigned to the VM?

8

> How much RAM have you assignde to the VM?
> If you have memory balancing, how much min and max?

Min 512Mo / Max 4096Mo

Drew White

unread,
Jun 29, 2016, 3:44:59 AM6/29/16
to qubes-users, ghbouc...@gmail.com


On Wednesday, 29 June 2016 17:41:49 UTC+10, ghbouc...@gmail.com wrote:
Hi.

I'm talking about the VM "virutal" CPU.


hint: 1 vCPU = 1 thread of the real CPU.
 

> How many threads do you have assigned to the VM?
8


Well, without knowing what CPU is, it is hard to provide complete assistance.
All I can say is, that's a lot of CPU usage, try to make it only 2 vCPU.
 

> How much RAM have you assignde to the VM?
> If you have memory balancing, how much min and max?
Min 512Mo / Max 4096Mo


Set it to not balanced, and only 1024.
Increase it to 2048 if you feel you really have to assign RAM to it.
 

Chris Laprise

unread,
Jun 29, 2016, 9:48:17 AM6/29/16
to Drew White, qubes-users, ghbouc...@gmail.com
> --

This touches on a pitfall I found in Qubes: If you play with memory or
device-assignment settings, the vm may end up not have memory balancing
enabled without you realizing it. Then you are running the vm with min
RAM only, and giving it something a bit challenging will cause it to
swap memory a great deal.

The other reason I can think of for very high CPU use during playback
would be that the video is very high res and high quality.

Finally, some players may expect graphics capabilities that are very
different from what Qubes allows. Not all of them will perform
acceptably with minimal graphics support (and they are probably not
tested that way).

Chris

Drew White

unread,
Jun 29, 2016, 8:34:34 PM6/29/16
to qubes-users, drew....@gmail.com, ghbouc...@gmail.com, tas...@openmailbox.org


On Wednesday, 29 June 2016 23:48:17 UTC+10, Chris Laprise wrote:
This touches on a pitfall I found in Qubes: If you play with memory or
device-assignment settings, the vm may end up not have memory balancing
enabled without you realizing it. Then you are running the vm with min
RAM only, and giving it something a bit challenging will cause it to
swap memory a great deal.
 
Exactly the thought that crossed my mind to say to do that.

The other reason I can think of for very high CPU use during playback
would be that the video is very high res and high quality.

Full HD video doesn't make THAT much difference compared to low resolution.
It still should not use 8 threads fully.
I can run MPV with 1 thread and 1 GB RAM on Debian Templated AppVM watching a Full HD video with no issue.
  Mind you I am using a high speed SSD. I don't know if that could be the cause either.


Finally, some players may expect graphics capabilities that are very
different from what Qubes allows. Not all of them will perform
acceptably with minimal graphics support (and they are probably not
tested that way).

MPV doesn't need that much. It works fine in my templates with nothing special added.

raah...@gmail.com

unread,
Jun 29, 2016, 9:53:56 PM6/29/16
to qubes-users, drew....@gmail.com, ghbouc...@gmail.com, tas...@openmailbox.org
using vlc to play videos and changing the video output mode to x11, dropped my cpu use from over 60% to 20% maybe it will make a difference for you as well.

Rusty Bird

unread,
Jul 1, 2016, 6:34:51 AM7/1/16
to qubes-users, ghbouc...@gmail.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

> I often watch videos offline. I download .mp4 files dans I play
> them in a dedicated VM (debian template) with MPV. When I launch a
> video, the VM CPU goes up to 98%, It is quite strange.

Try "-vo x11". mpv sometimes defaults to "-vo sdl", which is very slow.

Rusty
-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJXc46KXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfysMQAJFQ5h0Mrc2mxQmayQZax+SY
1nlTVlDdUBw2/14YjU6hJ2Hf88ARFLAZNYvn5yb4IPFYRNBTwD2dNjLIg+Kxbx8A
yyT1Agnqll6dDJAQWqGmr2aI8xx5eftUpi92xRLgPaRP3JGyk+pYqvZQLZ6XOOaK
EVlNE7mpJD1PKw0NcrIZYXKk15gdfzVe9waot9awmzJrRJGnOyrvekODuHm6zf2R
yXUcGn498xvbkT9mHsKvwoo1GfhrmfoTAyI+z3T1WvXI6vhhouGbMqyCo1GkU4fy
d2fT8GQLZa6zIy8GC6wQLQPSOo5FqkyQRZXGBHo5ulL+8HKV5RhoCeGdJr0umcfL
UPKHkx0/vsU2+m5Dn3WvC9BDG+c7LoO24pMpOHNGpXaqK2+sWVNiIqyy1WxwzWvM
9pmEv32SyfOU5xpvMbNne7zgCJWdfWPP/P2lcHZqJ02t3uTh3SQblh8PeBDLGfDT
PRDAi3pv7hxDuQtsMYJ4iR8RGbK1wClSOQIjy3ZH0E2pU10yBEzLiQVua6GMi6KV
u2iVzsYvBb6lGRDveAB5Ljjta+I7JGLmM1m9F3KXLfJoZKemJYGBYZJrJzdgZqFL
16Nqo4GvUVDBC+OPBpTH0o1ZHw0QijOw9ZKme2m4O52+zB1+juPZW6PVSNiO2X3n
sJsCwaY5CBjhbkWDTCMI
=2iAM
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages