[qubes-users] CPU Pinning for Slow Disk Writes

I am running a low end laptop with I a 2.3GHz four core processor and 4GB ram. It has VT-x but not VT-d. I am experiencing very slow disk writes when using the internet and particularly when watching movies on youtube and other flash sites. Also, I experience similar slow disk writes with JQuery heavy sites. I am using Qubes 2 I think beta 2 (definitely version 2 though).

The disk write problem is very serious, the computer practically freezes for a few seconds and even up to a minute. I can see the hard drive light lit up and hear the hard drive so I am fairly certain that it is a disk write bottleneck. I may also have some network bottlenecks but I will deal with that once this issue is resolved.

Currently, I am not sure this is the ideal OS for me. I chose it mostly for the security but I understand that lack of VT-d presents a limitation here.

Looking at the Xen documentation I am led to believe that cpu pinning and limiting one core for the dom0 only would help. I have tried pinning every vcpu to its corresponding cpu in the dom and for each vm running (usually only netvm, firewallvm, and a third, generally I don’t run two appvm simultaneously) pinned each vcpu to its corresponding cpu excluding cpu 0 so I double up on each vm on one of the three remaining cpus. Thus on netvm 0-1 1-1 2-2 3-3, firewallvm 0-1 1-2 2-2 3-3 and thirdvm 0-1 1-2 2-3 3-3. I find that this does not really help.

It then occurred to me to limit the cpus to each vm but allowing the scheduler to decide on which vcpu goes with which cpu. The point is that each vm would only have access to cpus 1-3 leaving cpu 0 for the dom only.

  1. I am not sure if I should still pin each vcpu to its corresponding cpu number on dom0, although when I include the option dom0_vcpu_pin on grub boot options, it doesn’t seem to do that as my understanding is that it should.
  2. Most pertinent, I am unsure how to limit the number of cpu cores to the vm. Is it stupid of me to want 4 vcpu cores on the real cpus?
    This Xen article says the option cpus=“1-3” would limit 3 cores to that particular vm. http://wiki.xen.org/wiki/Tuning_Xen_for_Performance
    While this man page for qvm-prefs has an option to limit the number of vcpus but not cpus. http://qubes-os.org/trac/wiki/Dom0Tools/QvmPrefs

So as I am writing this, it occurs to me that my lack of insight is in wanting 4 vcpus to 3 cpus. Can I confirm this. Then, what I should do is use qvm-prefs to limit the number of vcpus. Nonetheless, I still would want those three to use only the cpus 1-3 and leave 0 only for dom to increase disk write speed. The problem is that I cannot find the equivalent to the cpu= option on the xen documentation in the qvm-prefs man page.

Please consider that my main purpose for writing is to resolve the disk writing bottleneck. If I am totally on the wrong track please do not hesitate to say so or if you feel that the hardware I have is inappropriate for this OS.

Thank you

I want to also point out that I’m usually on a vpn which I run from the appvm not from the netvm. I’ve noticed a few times that when the vpn is not running, it does seem to load pages faster but I haven’t used it long enough without the vpn to determine if that is the cause of the disk write problems.

I would appreciate a response soon.

Thank you.

I've run QubeOS on an even lower-end laptop with only a Intel P6200 @ 2.13GHz with 4GB ram and never experienced this.

I might be wrong, but I never messed with anything, just installed it and used it.

You mention a Quad Core, but what CPU? There are a lot of AMD quad cores that are pretty crappy performance wise.

Also I personally think the problem is a lack of ram, I found 4GB to be sluggish at times and I know 4GB is not that much to run this, at least trying to run a few VMs.

I'd be interested to see what happens if you had at least 6GB or better yet at least 8GB.

Also how old is your hardware, could be dying, also your ram could be slow and have you run any memtests on it to make sure your ram is ok?

And one last thing you hard drive might not be running good and now it's starting to show it's age in QubeOS.

So when you're troubleshooting start out telling people the specs on your hardware and any tests you've run on them to test them and check them out, THEN proceed with other steps. :slight_smile:

Wooo someone needs to relax because I have no idea what you are talking about or who you think I am but I am not this so called person that has been stalking you.

I only just joined this mail list a few days ago and as a Geek I simply replied by my own experiences to try and help is all.

So it seems like you've had some bad experience(s) with someone here.

Anyhow I was only trying to help and again I'm not this person(s).

So getting back to your replies that seemed to of been deleted, I guess because you were going off and cussing at me.

-----> Does that really matter, I mentioned clock speed.

Good point, I always thought clock speeds are clock speeds, but someone in the recent past pointed out that some CPUs this is not the case and I've heard people mention to me some bad performance on some AMD quad cores.

As far as having more ram 6GB-8GB no it's not BS. When I used QubeOS with only 4GB and I tried to run a few VMs at a time it would get sluggish, then when I tried it on another box with 8GB it was very fast and repsonsive.

I thought it was mentioned somewhere that 4GB is the minimum is why I'm bringing this up, either way it doesn't hurt to try and add a little more if you have it, it's certainly an easy test to see.

I guess you did hardware tests to that takes care of that.

the issue is resolved and it was that the vm needed to allcated more memory. if you knew this then I dont see why you didnt say so in the first place. i dont feel you have been vindicated, on the contrary, i think this revelation justifies my initial acerbic response.