Qubes and ram

297 views
Skip to first unread message

sgshsjj...@gmail.com

unread,
Feb 22, 2017, 5:36:33 AM2/22/17
to qubes-users
How does Qubes uses memory? I use about 20VMs (AppVMs, NetVMs, ProxyVMs, etc) and i don't see any difference between 8 and 16 gigs on laptop, does it make sense to add more memory?

Thanks.

Zrubi

unread,
Feb 22, 2017, 5:55:43 AM2/22/17
to sgshsjj...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
there is no such thing as too much RAM. :)

I'm using ~12 online VMs and usually hitting memory limits of my 8Gb.

- --
Zrubi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYrW4gAAoJEH7adOMCkunmDooP/RVipZoCy6sIaYxMH83Cuz4V
HLVZjYPRxss/GiXf59XA/0XmnXTEBt9KoZQEr4JQ3MwaJUzL3r4wsdb4IL0DdEgO
NzcCGnLaOI4y2KXVOBRiKOyTYi0FujNorMGCpNdmW4BWmtPjq4jWiwcXLPnsWd35
ZrPKTCdmtBHQLRtZv4TLIfso1d2RKMtpBHKmlLDwGOlt4WC2mKnNdRFLGoSe4waM
dCfiKjyiWHhPSwhR1o/PzvnMe0N5NgC8AvwVEd52NqZHfjDks3IS1qgLPhRQ5KPO
QlWN+2cmQpYfpSPmJAM1g4eWheuh+6OcJLieFjDqdqYj3zFnclEQnGKlD0XRRfg6
T+tMI/akoIh5NcxTGdRLz5WdKI2VzF699GW0dJ5H5TWw4W7BQkhQrNUQRgeZNhp8
6IpTrgBNaYiyg7pXXMv/0lq0QslV/0Onmg/dYc/g7wQHGVk6N8g40/J2r6uckZNu
Py5nNDBEiLLkAk5KLuq9isXIo5BlcJvxNvOvvrcaMU32wgjDClr5in4Qo9ea3R/o
48zFzz2kbHtlS40STPE3FFI+pNxk9NiH7s2Oao2Jy9p/to6+8a7kCU2jl7KZC6Bs
x36GToI6OUNZur5IiWvc8cHrC4H2yXl/ONlezR26VGxNjgBmeSxe+xDJZnlvw7uU
cDb9JeORSf7zWpQGShVl
=jySu
-----END PGP SIGNATURE-----

Ted Brenner

unread,
Feb 22, 2017, 10:09:31 AM2/22/17
to Zrubi, sgshsjj...@gmail.com, qubes-users
I have 8 GB of RAM and I feel like I can't have more than 3 AppVMs open (with Chrome) before I hit a limit and can't open up anymore appVMs. Could be my configuration in terms of what minimal amount of memory I assign though I'm using everything as it comes right out of the box. If someone can get 12, I must be doing something wrong.


--
You received this message because you are subscribed to the Google Groups "qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscribe@googlegroups.com.
To post to this group, send email to qubes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/bae9891a-e216-dab9-4c30-3606ab69842a%40zrubi.hu.
For more options, visit https://groups.google.com/d/optout.



--
Sent from my Desktop

Illidan Pornrage

unread,
Feb 22, 2017, 10:29:53 AM2/22/17
to qubes...@googlegroups.com
On 02/22/2017 04:09 PM, Ted Brenner wrote:
> I have 8 GB of RAM and I feel like I can't have more than 3 AppVMs open
> (with Chrome) before I hit a limit and can't open up anymore appVMs. Could
> be my configuration in terms of what minimal amount of memory I assign
> though I'm using everything as it comes right out of the box. If someone
> can get 12, I must be doing something wrong.
>
> On Wed, Feb 22, 2017 at 4:55 AM, Zrubi <ma...@zrubi.hu> wrote:
>
> On 02/22/2017 11:36 AM, sgshsjj...@gmail.com wrote:
>>>> How does Qubes uses memory? I use about 20VMs (AppVMs, NetVMs,
>>>> ProxyVMs, etc) and i don't see any difference between 8 and 16 gigs
>>>> on laptop, does it make sense to add more memory?
>
> there is no such thing as too much RAM. :)
>
> I'm using ~12 online VMs and usually hitting memory limits of my 8Gb.
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "qubes-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to qubes-users...@googlegroups.com.
>> To post to this group, send email to qubes...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/qubes-users/bae9891a-e216-dab9-4c30-3606ab69842a%40zrubi.hu.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>


I actually had approximately this behaviour with 4GB of Ram.
With 8GB Ram I can at least get 3 Firefox + sysvms + one set whonixvms +
a bunch of F24-minimal running.
When I had only 4GB I shrank down the netvms. I installed
network-manager + nm applets + nic firmware in the minimal template and
set the netvm,firewallvm,usbvm to the minimal template. Take a look at
the wiki which packages exactly are required for a netvm.
I also decrease the default maximum ram for appvms as necessary.
Browsers cant spam ram they dont have.

Illidan

Zrubi

unread,
Feb 22, 2017, 10:35:11 AM2/22/17
to Ted Brenner, Zrubi, sgshsjj...@gmail.com, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 02/22/2017 04:09 PM, Ted Brenner wrote:
> I have 8 GB of RAM and I feel like I can't have more than 3 AppVMs
> open (with Chrome) before I hit a limit and can't open up anymore
> appVMs. Could be my configuration in terms of what minimal amount
> of memory I assign though I'm using everything as it comes right
> out of the box. If someone can get 12, I must be doing something
> wrong.

Well that 12 online VM are distrbuted something like:

sys-firewall
WiFi
Ethernet
sys-usb
2 different VPN proxy VM

those are with only 300Mb initial 512Mb max memory.

the remaining ~6 AppVMs are starting with 512Mb to 2048Mb max.

Of course all depend on what you are suing in those VM's. But I
usually have at least 1 browser +terminals +mail clients open.


- --
Zrubi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYra+gAAoJEH7adOMCkunmCkQQAI10dZeSNyrth4HpPYZFzOG0
zgqVBdzfb0hQuG9ZVe0djVmEmn3kDueDFNDZx3xB28KrM3vuHLnW9jz8We1tkuAx
MqhUXjcxzkJRu2ZuWwRiXPa/TWI3h3vIALZosgvuKhQJ/QVFzvqIQKf4gqPzszkn
nglHgdrZK8rH90bxbFko798Ti7gU74tEIK3N6xq6/5KIRAC/9JJpCBr0zzmSqUaK
srsq1Sn2Ve5vtQmSSL/QC7E6Qr8FUkwsJYOYEMwHubr7QkNGIfmyc6UfI1YkLo6z
RjTZzxuyv7TXHa0sdK72NoLMI9xpoBTmWDiFTu5AYXiDo+Nc2mhXYa1iuYr2bPLy
TM049KFGqUBd+RD2FT1vDx3JjkVGtYCgBQEBesypOFUnyZYRuc+nbuUTqVqm4g4g
E72C9eKO2dH0IqaTYiBJQGyQVIK3k5cg/01brPhDFyWOV7ws2zzKwKHmRMJY0COc
dKiI2P+1w52Xo7XJ7OS/rB6M8A7h9d09dDw92fUGZdBl/vAYObnFAL8/+7pERZz7
YydSnTjY9k+OG05f4kd+PrCjV2BJSNkmNT2VyzIHKI5EaRwLsOcMWPvmp8TvjG3Y
Xzzo7uUE0BDZ67iiH5D4NFDmWaqnDXLl7z486e1MqPosWozm1Kta+bma9TqHRaQt
zYzHA79W2uCaBimT7eKU
=xQ1o
-----END PGP SIGNATURE-----

Holger Levsen

unread,
Feb 22, 2017, 12:37:24 PM2/22/17
to qubes...@googlegroups.com
Hi,

both in qubes-manager as well as in the i3 status bar, Qubes only displays
the allocated memory, which pretty much always is 95% of the available memory,
so I came up with this one-liner to calculate the really used memory:

echo $(((`(for VM in $(xl list|egrep -v "(Name|dom0)"|cut -d " " -f1) ; do /usr/lib/qubes/qrexec-client -d $VM user:"/usr/bin/vmstat -s -S K" -t -T|grep "used memory"|cut -d "K" -f1 ; done)|xargs echo|sed "s# #+#g#"`)/1024))MB used

it's still (maybe) a bit ugly for two reasons:
- I don't use /usr/bin/bc cause I don't want to have this installed in dom0
- instead of running /usr/bin/vmstat I would rather like to access
(think /usr/bin/cat) /proc/meminfo of the VMs from dom0, but I don't know
how to do this yet.


--
cheers,
Holger
signature.asc

Tim W

unread,
Feb 22, 2017, 7:09:17 PM2/22/17
to qubes-users
On Wednesday, February 22, 2017 at 5:36:33 AM UTC-5, sgshsjj...@gmail.com wrote:
> How does Qubes uses memory? I use about 20VMs (AppVMs, NetVMs, ProxyVMs, etc) and i don't see any difference between 8 and 16 gigs on laptop, does it make sense to add more memory?
>
> Thanks.

Its very use specific as its how you use the vms ( the apps and how you use them) If you have 4 app-vm (+ the normal sys-vm) running a internet browser and each has 20-50 heavy mem tabs open you could max out even 16gig of ram.

Then again you could have 20+ appvms open running a single app each such as filemanger or some other low mem app like keepassx etc.

Holger Levsen

unread,
Feb 24, 2017, 7:05:08 AM2/24/17
to qubes...@googlegroups.com
On Wed, Feb 22, 2017 at 05:37:17PM +0000, Holger Levsen wrote:
> echo $(((`(for VM in $(xl list|egrep -v "(Name|dom0)"|cut -d " " -f1) ; do /usr/lib/qubes/qrexec-client -d $VM user:"/usr/bin/vmstat -s -S K" -t -T|grep "used memory"|cut -d "K" -f1 ; done)|xargs echo|sed "s# #+#g#"`)/1024))MB used

misses the used memory in dom0, so better:

echo $(((`(for VM in $(xl list|egrep -v "(Name|dom0)"|cut -d " " -f1) ; do /usr/lib/qubes/qrexec-client -d $VM user:"/usr/bin/vmstat -s -S K" -t -T|grep "used memory"|cut -d "K" -f1 ; done)|xargs echo $(vmstat -s -S K|grep "used memory"|cut -d "K" -f1)|sed "s# #+#g#"`)/1024))

which is better done like this:

echo $(((`( vmstat -s -S K ; for VM in $(xl list|egrep -v "(Name|dom0)"|cut -d " " -f1) ; do qvm-run $VM -p "/usr/bin/vmstat -s -S K" ; done ) | grep "used memory" | cut -d "K" -f1 | xargs echo | sed "s# #+#g#"`)/1024))

which is also easier to understand I think ;) Essentially it runs vmstat
everywhere and adds up the numbers for "used memory", that's all.

And, it still should better read /proc/meminfo…


--
cheers,
Holger
signature.asc

raah...@gmail.com

unread,
Mar 4, 2017, 3:49:27 PM3/4/17
to qubes-users, ma...@zrubi.hu, sgshsjj...@gmail.com
> To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users...@googlegroups.com.
>
> To post to this group, send email to qubes...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/bae9891a-e216-dab9-4c30-3606ab69842a%40zrubi.hu.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
> Sent from my Desktop

haha no u doing it right, I saw 20 vms for 8gb and was like what!>! Depends on what you using your vms for. whats running on them etc... in other words you actually use your pc for more then just looking at it.

on my 8g i can only have like 6 or 7 vms running, including sys-vms. on the 16 gb machine about double that. before I notice slowdown. or dom 0 ram going down.

raah...@gmail.com

unread,
Mar 4, 2017, 3:50:23 PM3/4/17
to qubes-users, griz...@gmail.com, ma...@zrubi.hu, sgshsjj...@gmail.com

ya just browsing can eat all 8gb of ram nowadays haha.

Ted Brenner

unread,
Mar 4, 2017, 10:40:19 PM3/4/17
to cooloutac, qubes-users, Zrubecz Laszlo, sgshsjj...@gmail.com
I added another 8 GB so now I'm at 16 total and I've not run into any issues yet. knock on wood. I think the max I've had is 9 VMs including the sys-net, sys-firewall and sys-whonix. One being a Windows HVM. I plan to optimize my setup at some point but right now there's no rush.

turb...@gmail.com

unread,
Mar 5, 2017, 12:09:06 AM3/5/17
to qubes-users
среда, 22 февраля 2017 г., 13:36:33 UTC+3 пользователь sgshsjj...@gmail.com написал:
> How does Qubes uses memory? I use about 20VMs (AppVMs, NetVMs, ProxyVMs, etc) and i don't see any difference between 8 and 16 gigs on laptop, does it make sense to add more memory?
>
> Thanks.

Lets calculate :

sys-net
sys-i2p
sys-firewall
sys-whonix
sys-vpn-cli
sys-vpn-gui
sys-vpn-bitmask
torvm
fedora-24
debian-9
whonix-ws
whonix-gw
whonix-ws-i2p
whonix-gw-i2p
archlinux
xenial
kali
blackarch
fedora-24-tor
untrusted
personal
work
vault
anon-whonix
anon-web
anon-i2p
win7
template-builder (?)
signal or martus (?)

It's only by default : ~30 VMs
Reply all
Reply to author
Forward
0 new messages