February 4, 201412 yr Author i would like to make unraid use only 4 cores and give 4 to windows and 4 to arch but im unsure if this is the way xen handles resources/how to change it, or if unraid is only seeing 8 of my 12 cores, or if unraid is supposed to see all of the resources and the VMs subtract from that...
February 4, 201412 yr unRAID would see all of your cores / memory. The VM's then pull from that pool. This isnt a hard "I've given windows 4 cores so I only have 4 left" though. A VM will only use what it "needs", this is the key point. 90% of the time a server / VM is sitting idle doing absolutely nothing so those resources can be allocated and used by other VM's. Memory works the same way. If you have 16GB of ram and give 8GB to a Windows VM it is highly unlikely that that VM will actually be using or ever use all of the allocated memory. Hope that helps.
February 4, 201412 yr A vanilla unRAID 6.0 with Xen and no plugins is only 560MB. Typically you assign dom0 (unRAID) a small amount of memory and pin 1 CPU to it. The rest you set aside for your VMs. The only reason to increase the memory for dom0 is if you use cache directories or other plugins. More CPUs or more memory doesn't make unRAID run faster, copy files faster, makes the VMs work faster, etc. Example syslinux.cfg label Xen/unRAID OS kernel /syslinux/mboot.c32 append /xen xsave=1 cpufreq=xen:performance dom0_mem=1024M,max:2048M dom0_max_vcpus=1 dom0_vcpus_pin iommu=1 --- /bzimage console=tty0 xen-pciback.hide=(00:11.0)(00:12.2) --- /bzroot
February 4, 201412 yr A vanilla unRAID 6.0 with Xen and no plugins is only 560MB. Typically you assign dom0 (unRAID) a small amount of memory and pin 1 CPU to it. The rest you set aside for your VMs. The only reason to increase the memory for dom0 is if you use cache directories or other plugins. More CPUs or more memory doesn't make unRAID run faster, copy files faster, makes the VMs work faster, etc. Example syslinux.cfg label Xen/unRAID OS kernel /syslinux/mboot.c32 append /xen xsave=1 cpufreq=xen:performance dom0_mem=1024M,max:2048M dom0_max_vcpus=1 dom0_vcpus_pin iommu=1 --- /bzimage console=tty0 xen-pciback.hide=(00:11.0)(00:12.2) --- /bzroot I had some trouble booting when giving dom0 1GB. I think this is because: a) xen kernel itself takes a bit, b) it appears xen loads both bzimage and bzroot into memory, and then later the bzimage kernel unpacks bzoot. I think what happens is xen+bzimage+bzroot+unpackedbzroot > 1GB but after boot memory used to hold bzroot file itself is released. This is why in -beta3 syslinux.cfg file I have dom0 ram set at 2GB. Maybe overkill but I though it can be tweaked later and I didn't want anyone running into problems.
February 4, 201412 yr I think what happens is xen+bzimage+bzroot+unpackedbzroot > 1GB but after boot memory used to hold bzroot file itself is released. This is why in -beta3 syslinux.cfg file I have dom0 ram set at 2GB. Maybe overkill but I though it can be tweaked later and I didn't want anyone running into problems. Autoballon is not enabled by default. You could set the minimum and then maximum and let it balloon and shrink back down. I haven't loaded Ironics VM Appliance but I suspect will it it less than 512GB of RAM with all those apps loaded / running. Plex would be the only App that would need memory.
February 4, 201412 yr Author So from a best practices point of view every vm.cfg should always be vcpus=max amount you have in the pc memory=max amount you have in the pc This way they all "share" what ever they need? On a side note, Unraid does not appear to see all of my cores. nproc outputs 8 and i have 2 6 core processors installed. I am assuming this is a kernel tweak? so in my case each .cfg would be vcpu=8 and memory=8gb and you do not need to divide it up as it will balance them between vms? PS: i feel privileged i got a reply from but lime-tech and schoolbus!
February 4, 201412 yr I would still only allocate what you "need" for any given vm. Also was not aware you could limit the cpu and memory of dom0 like that. Thanks Grumpy / Tom. Learn something new every day
February 4, 201412 yr So from a best practices point of view every vm.cfg should always be vcpus=max amount you have in the pc memory=max amount you have in the pc No, I was speaking to the Dom0. You want to assign the VMs what you think the memory needs to be and the number of CPUs. Unless you are transcoding, encoding or running a Windows VM... I highly doubt your VM is going to need more than 1GB or memory or 1 VCPU. Ironics VM Appliance (without the apps loaded) takes up 80MB or something. My XBMC VMs using Video Hardware passthrough only have 1GB or memory and 1 VCPU assigned and playing 1080p with HD Audio still only use 10% or less of the CPU / memory.
February 4, 201412 yr Author So from a best practices point of view every vm.cfg should always be vcpus=max amount you have in the pc memory=max amount you have in the pc No, I was speaking to the Dom0. You want to assign the VMs what you think the memory needs to be and the number of CPUs. Unless you are transcoding, encoding or running a Windows VM... I highly doubt your VM is going to need more than 1GB or memory or 1 VCPU. Ironics VM Appliance (without the apps loaded) takes up 80MB or something. My XBMC VMs using Video Hardware passthrough only have 1GB or memory and 1 VCPU assigned and playing 1080p with HD Audio still only use 10% or less of the CPU / memory. Got it, thank you Schoolbus! Dom0 = 1 cpu mem=1024M,max:2048M (unraid with cache dir, and vfs recycle) based on your sysconfig. Dom1 = 3 cpu mem=2048M (windows7 with utorrent, sb, cp, and VPN) Dom2 = 8 cpu mem=5120M (Arch linux with PLEX and mumble) = 12 core and 8 gb ram Would that be a better solution?
February 4, 201412 yr Would that be a better solution? Cache Directories is probably going to want more memory is my guess. I don't know your set up or how much space you have. Your new best friend xl top In there you can see how much memory, VCPUs, network, block device read / writes, etc. that is going on the Dom0 or DomUs. Look at the both of the screen and play with the commands and better familiarize yourself with it / how to read it.
February 5, 201412 yr Author EPIC TY! xentop - 16:36:23 Xen 4.3.1 3 domains: 1 running, 1 blocked, 0 paused, 0 crashed, 0 dying, 0 shutdown Mem: 8387900k total, 8240576k used, 147324k free CPUs: 12 @ 1809MHz NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR VBD_RSECT VBD_WSECT SSID archVM --b--- 30 1.4 5242880 62.5 5243904 62.5 8 1 53612 922 0 0 0 0 0 0 0 Domain-0 -----r 632 9.1 1048576 12.5 2097152 25.0 1 0 0 0 0 0 0 0 0 0 0 Windows7 ------ 177 0.0 1832804 21.9 1836032 21.9 2 1 2136 2586 0 0 0 0 0 0 0 Delay Networks vBds Tmem VCPUs Repeat header Sort order Quit
February 5, 201412 yr EPIC TY! Cache Directories running, Windows VM, heavy duty Applications VM (with almost every plugin) on an unRAID Server with 1 CPU and 2GB of memory assigned to is only 9.1% CPU Utilization. People were freaking out thinking this would totally hose their system and would have to spend $2,000 on hardware. After all the debate, confusion, arguments, etc... Seems funny now doesn't it? LOL! Anyway... "xl top" should help you see what is going on, optimize / tweak your VMs / Dom0 as we continue through the beta test and you add new VMs.
February 5, 201412 yr A vanilla unRAID 6.0 with Xen and no plugins is only 560MB. LOL v1 ran comfortably in 256MB total RAM though I always worried about that and recommended 512MB.
February 5, 201412 yr LOL v1 ran comfortably in 256MB total RAM though I always worried about that and recommended 512MB. Me thinks you are beholden to your old Sun / Slackware days and your OCD causes A LOT more problems than it solves. Get with the times and make you life easier... 1. Quit trying to put EVERYTHING under the sun in a bzimage. 2. Create dual partitions on a USB Flash drive via an ISO. 3. Partition 1 - VFAT - All the crap that you need and what you want users to access / configure / etc. (key file too) via Windows and Mac. 4. Partition 2 - EXT4 (noatime and no journaling) and put the rest of Slackware on there. You can put A LOT of Slackware in the bzimage but for crying out loud.... Put things like /lib64, /usr, /bin, /sbin, etc on the EXT4 Partition so people only have to load something ONCE and not have the program and the amount of space it takes up on a Flash Drive get loaded into memory. It's writecycles that "wear out" a flash drive... not reads. A $5 POS USB Flashdrive has 100,000 writecycles and how many times do you think someone is going to be installing NEW packages in Slackware after they loaded them once?!?!?!?! Not to mention, you will solve 80% or more of the BS that plugins developers / users have to deal with like downloading and installing 6 different versions / kinds of perl or python, zlib, etc. from who knows where.
February 5, 201412 yr Author Where is the best place to put your VM machines? I currently place them on the cache drive and have removed my cache drive from the array to prevent double write. IE download a file in a VM and copy it to unraid share (VM.img on cache -> unraid share on cache)
February 6, 201412 yr http://lime-technology.com/forum/index.php?topic=31737.0 Very similar / duplicate discussion. Sent from my Nexus 5 using Tapatalk
Archived
This topic is now archived and is closed to further replies.