For small files hashing is just ok, but with huge ones you can easily find md5sum
is CPU bound. Is there any hashing algorithm able to scale out on multiple cores? Any workarounds? Ideas? Anything? :)
I know that after running top, I can press 1 and get a list of the CPUs with their utilization percentages. I suspect I can do this in batch mode too with the -b option, but I don't know how, and I cannot find it in the manual.
I need to read it periodically from a python program, so it must be in batch mode.
We've got a KVM host system on Ubuntu 9.10 with a newer Quad-core Xeon CPU with hyperthreading. As detailed on Intel's product page, the processor has 4 cores but 8 threads. /proc/cpuinfo and htop both list 8 processors, though each one states 4 cores in cpuinfo. KVM/QEMU also reports 8 VCPUs available to assign to guests.
My question is when I'm allocating VCPUs to VM guests, should I allocate per-core or per-thread? Since KVM/QEMU reports the server has 8 VCPUs to allocate, should I go ahead and set a guest to use 4 CPUs where I previously would have set it to use 2 (assuming 4 total VCPUs available)? I'd like to get the most possible out of the host hardware without over-allocating.
Update: Chopper3's answer is undoubtedly the right approach. However, I'd still love to hear from any hardware experts out there who could elucidate the performance aspects of threads vs. cores... anyone?
All
I've had a problem on my server since I migrated one of my VM's from Windows 2008 Server to Windows 7 (ultimate): though I've assigned four cores to the VM and it even seems to see them, it seems to think it has two cores!
Can anyone tell me what's going on here? I thought it could have been some incompatibility between KVM and Windows 7 but since it sees the virtual processors I'm beginning to think not...any clues?
Here's a screenshot of process manager showing only two cores on the same box:
For an Intel based system keeping the number of cores constant how much difference would there be between two dual core processors and one quad core processor? We run Oracle OLTP databases on two dual core processors. With fewer dual core processors available we may need to switch to quad core, but we are limited to four cores due to licensing issues, so will have to switch to one processor. If we make the switch should I expect to see a change in real world processing speed?