Mac OS X Benchmark: native vs virtualized, part 2

I've been really disappointed by my last benchmark of a virtualized Mac OS X running on top of ESXi with graphics card accessed in passthrough mode. So disappointed in fact that I had to make new tests.
This time, I've decided to ditch the six years old XBench, and to use proper video benchmarking tools: Geeks3D GpuTest, and Cinebench. And guess what? Thats better.
To run those tests, I've had to install OS X 10.8.2 because Geeks3D GpuTest doesn't run on Mac OS X 10.6.8. So I dedicated a SATA HDD on my Mac Pro to a fresh install of 10.8.2, created a VM with it and ran both benchmarks, once from the Mac Pro booted from OS X, once from the OS X VM.

In the chart bellow you can find FurMark and GiMark tests results for a native OS X system running on the Mac Pro, and for the exact same system running as a VM on top of ESXi hypervisor. No tuning was done, I've used the default settings for every benchmarks.

Geeks3D GpuTest Native VM
FurMark (AvgFPS / Score) 47 / 2845 47 / 2872
GiMark (AvgFPS / Score) 33 / 2000 7 / 446

FurMark scores the same frame rate on VM and on native OS X. But GiMark is not good at all, with a VM score 4.5x lower than reference.

Cinebench's results are quite interesting too:

Cinebench Native VM
CORES 4 4
LOGICALCORES 2 1
MHZ 2800 2663
CBCPUX 5.038354 3.797552
CBOPENGL 32.284100 27.319487

VM results are quite close from reference, but the CPU frequency is reported as 2.663 GHz instead of 2.8 GHz, and the VM has only 4 CPU threads, instead of 8. This explain the CPU performance drop between native and virtualized OS X. The OpenGL score is quite good, showing only a 15.4% drop.
We are very far from the 87% drop on XBench's OpenGL test.

On the left side the native OS X, on the right side the virtualized OS X:
Cinebench results for OS X 10.8.2 native vs virtualized

Mac OS X on VMware ESXi: ATI Radeon passthrough

Lately I've been quite involved into a virtualization project: running Mac OS X and Windows as workstations on top of VMware "bare-metal" hypervisor ESXi on my Mac Pro. It requires a good knowledge of virtualization and VMware products like ESXi and VSphere, serious sysadmin skills, and lots of perseverance.

I've finally managed to boot a Mac OS X 10.6.8 virtual machine on top of ESXi, on my Mac Pro with a proper ammount of RAM (12 GB), and the graphics card in passthrough mode. That required a manual tweak of the vmx file.
The VM wouldn't boot when configured with both the graphics card in passthrough and more than 2 GB RAM. I've had to add into the vmx file those two lines:

pciHole.start = "1200"
pciHole.end = "2200"

Then I was able to boot my Mac OS X VM with 12 GB RAM and the graphics card in passthrough. Great. I'm still lacking passthrough for USB keyboard and mouse, meaning I need a remote computer with VSphere Client to control my VM using the embedded console. But the VM uses the physical ATI Radeon, and the physical screen, and in theory it could use full GPU power.

It looks like things are working OK, but it'll take time and many more tests to make sure everything is really working. For example, I was not able to launch 3D FPS games like Left 4 Dead and Left 4 Dead 2 into the VM. The game would crash on launch.

Escaping the Apple ecosystem: part 0

Years from now, I've understood that the evolution of the Apple ecosystem would eventually become an ethic and practical problem for me and for other longtime Mac OS X power users. I will not give details here, but it's closely related to constant patent fights, proprietary appstores and their underlying business model, lack of professional hardware and software, lack of openness, iOS convergence, etc.
The fact is, I'm deeply addicted to Mac OS X (10.6 branch). It sports great functionalities, from great APIs, and is very nice to use (unless you are a linux control freak upset by the quite limited Window Manager of Mac OS X).
From my standpoint it has critical functionalities that I would miss a lot on other OSes, some of them I use more than ten times a day. For example, the ⌘-k combo that allows me to connect to WebDAV, AFP, NFS, and CIFS shares, to VNC servers… So convenient, so irreplaceable. I could find dozens different little (or big) things that make me stick with Mac OS X. Some of them are quite huge: it's not Windows, it runs my software (Adobe's CS5, Valve's L4D2, my beloved text editor BBEdit and many more), it's UNIX under the hood - and I must admit, the hood is constantly open.
I do understand of course that Apple is right about consumer products, they have a very good business model, and the recent rumor about a switch to ARM's CPU makes so much sense. But I'm no regular consumer. I spend 10 to 18 hours a day in front of various computers, have neither smart phone nor facebook account.
Unless I'm ready to give up much control to Apple, there's no way I move to iOS OSX 10.8 / 10.9. That's why I'm studying a path to escape the Apple ecosystem. I want it to be a slow process, allowing me to progressively switch from Mac OS X to something else.

Step zero

I think about step 0 as the core of my project, as the main idea. And that would be to keep on using Mac OS X. Huge step, uh? No kidding.
I'm currently evaluating various solutions that would allow me to:

  • keep Mac OS X as my main OS
  • use Windows, FreeBSD, linuxes as alternative OSes at the same time
  • enjoy full hardware power (use full GPU power, not emulated, not virtualized)
  • never reboot (I'm used to 15-50 days uptime, rebooting to change OSes is not an option)

Hence, I would be able to slowly switch my habits from Mac OS X to other OSes. Some softwares I need (Adobe's for example) will stay on Mac OS X until I buy a new version running on another OS, or until I find a nice alternative. That will take time.

In theory my step 0 would require at least:

  • A bare metal hypervisor running on my Mac Pro
  • a Mac OS X virtual machine capable of using natively USB ports, GPU, and SATA
  • a Windows virtual machine capable of using natively USB ports and GPU
  • optional: a linux VM capable of using natively USB ports and GPU

I've got plenty of power (2.8 GHz quad core Xeon), and plenty of RAM (24 GB). But believe it or not, that's not enough. For example, it's not possible to share the GPU between two active virtual machines. If you want direct I/O ("passthru" mode) for your graphics card, you need one card per active VM. That's not a real problem, My Mac Pro has few empty PCI slots, I can buy a fanless ATI Radeon or two as dedicated graphics cards for VMs.

As far as I know, VMware ESXi 5.1 is the only bare metal hypervisor supporting Mac Pro model 5,1 (mine). And VMware is also the only one supporting Mac OS X 10.6 (server) virtual machine on top of bare metal hypervisor (on top of Apple hardware). Fine.
VMware has "DirectPath I/O" that allows direct bind of a PCI device into a VM. For example, you can create a virtual machine and make it use the PCI GPU directly, so that you would have proper video power inside your VM.
Unfortunately this passthrough mode has severe limitations. Biggest ones are:

  • You can no longer create snapshot of your VM
  • You can no longer suspend your VM

I've installed VMware ESXi 5.1 on a spare SATA hdd into my Mac Pro. I've created a Windows virtual machine, and hooked the PCI graphics card on this VM using DirectPath I/O. It worked great. As soon as I've installed ATI drivers, the display plugged on the Mac Pro was reclaimed by the Windows VM. I was not able to dedicate USB ports to the VM, so for now it's kind of useless. Trying to launch a Valve game (Half Life Lost Coast) eventually fails. Probably a software configuration problem.
The same setup for a Mac OS X VM won't boot. I'm able to boot a Mac OS X virtual machine, using my very own SATA hdds in raw device mapping (ie. it boots my regular Mac Pro OS, from its physical hdds, as a VM). But if I try to use the ATI card via DirectPath I/O, it won't boot.

I'm stuck at step zero, with important questions asked, and not answered:

Is it possible to use GPU card passthrough with a Mac OS X guest? (also here)
Is it possible to configure USB passthrough on a Mac Pro with ESXi 5.1?

Feel free to help (and to correct my english). I really need those issues to be solved in order to move forward with this project.

helpful links:
fan speed of the ATI card with ESXi 5.1
Raw Device Mapping of local SATA disks on ESXi
ESXi as a Desktop with VMDirectPath I/O

PowerMac à vendre, 350 € (vendu)

Je vends mon Power Mac G5, tour bi-processeur PPC 2GHz. Il dispose de 3,5 Go de RAM, d'un disque dur 1To, d'une carte Airport, d'une carte ethernet Apple supplémentaire.
L'annonce complète est visible sur le bon coin, mais vous pouvez aussi me contacter directement via les commentaires.

Livré avec Mac OS X 10.5, clavier/souris Apple, il est à retirer sur place (je n'ai pas de voiture).

J’en veux un

Lytro RedHot, ElectricBlue et Graphite, image (c) Lytro

Certains y voient la plus grosse révolution photographique depuis 1800, d'autres y voient un gadget de plus. Moi je suis fan du look, de l'ergonomie, et j'ai hâte de voir la bestiole au travail. À la maison, chacun veut déjà le sien !

Tous les détails sont sur Lytro.com.

Bien migrer son PowerMac G5 vers un Mac Pro

L'achat d'une nouvelle machine nécessite dans la majorité des cas de pouvoir migrer ses données de l'ancien système vers le nouveau. Apple met des outils à disposition des utilisateurs pour remplir cette mission, et globalement ça marche plutôt bien. Cependant, quand l'ancienne machine et la nouvelle n'ont ni la même version du système, ni la même architecture processeur, et qu'on parle de plusieurs centaines de Go de données, tout devient un peu plus compliqué.

Dans mon PowerMac G5, j'ai deux disques durs de 640 Go. Un pour travailler, et un pour les sauvegardes. Dans mon Mac Pro, j'ai un disque dur de 1 To, et trois emplacements libres.

J'ai décidé de :

  • réinstaller un système personnalisé sur le Mac Pro (donc de reformater le disque fourni)
  • monter les deux disques du G5 dans le Mac Pro, pour en récupérer les données
  • poursuivre les sauvegardes Time Machine sur le Mac Pro, sans perdre l'historique du G5 (c'est le point le plus délicat)

Continue reading

Munin, carte RAID, et température des disques durs

Monitorer la température de ses disques durs n'est pas très compliqué. De base, Munin fait ça très bien avec un minimum de réglages. Il suffit d'installer smartmontools, Munin, et de régler ce dernier pour qu'il sache quels disques on veut surveiller.
On obtient rapidement ce genre de graphique :

Mais si les disques durs sont connectés non pas à la carte mère directement, mais à une carte RAID, la chose se complique. En effet, le système ne sait pas qui est ad4 (ou ad6, ou toute autre appellation interne). Le système ne voit que la carte RAID.

Disons que nous sommes sur un bon système (FreeBSD), avec une bonne carte RAID (3Ware) utilisant le pilote twa. Cette carte sera donc vue du système sous le nom interne /dev/twa0 (0 car c'est la première carte de ce type dans la machine).
L'outil smartctl permet d'accéder au S.M.A.R.T. des disques durs au travers de la carte RAID par des requêtes comme :

smartctl -a /dev/twa0 -d 3ware,0  # 1er disque branché sur la carte
smartctl -a /dev/twa0 -d 3ware,1  # 2nd disque branché sur la carte
...

Comme le plugin hddtemp_smartctl de Munin utilise smartctl aussi, il ne reste plus qu'à lui faire comprendre la syntaxe. On ne doit plus lire les données S.M.A.R.T. de /dev/ad4, /dev/ad6… mais celles de /dev/twa0 -d 3ware,0, /dev/twa0 -d 3ware,1
Il faut éditer le fichier plugins.conf de Munin, en créant une section [hddtemp_smartctl] dans la quelle :

  1. on crée des disques durs "virtuels"
  2. on rattache chacun de ces disques à notre carte twa0
  3. on précise le type de chaque disque dur (3Ware,0, 3Ware,1…)

Voici ce que cela donne pour une carte 3Ware twa0, à la quelle sont connectés quatre disques durs que l'on décide de nommer tout à fait arbitrairement hd0 à hd3 :

[hddtemp_smartctl]
env.smartctl /usr/local/sbin/smartctl
env.drives hd0 hd1 hd2 hd3
env.dev_hd0 twa0
env.dev_hd1 twa0
env.dev_hd2 twa0
env.dev_hd3 twa0
env.type_hd0 3ware,0 
env.type_hd1 3ware,1
env.type_hd2 3ware,2
env.type_hd3 3ware,3

J'insiste bien sur le fait que les noms hdx sont des abstractions arbitraires, utilisées pour mettre en relation un "dev" et un "type". On pourrait mettre "toto", "titi"… cela marcherait de la même manière.
Cela donne finalement quelque chose comme ça :

Nouveau serveur !

Voilà, finalement cela s'est passé très vite. Hier matin aux aurores je trouvais une configuration intéressante sur Ebay, avant 13h la vente était faite. J'attends donc maintenant de recevoir ma nouvelle machine. Il s'agit d'un serveur 1U Supermicro avec 4 tiroirs hot-plug, à base de carte mère X7DCL-I, doté d'un Xeon quad-core à 3GHz, de 16 Go de RAM, d'une carte raid 3ware 9650SE-4lpml, et de 2 disques durs 1To. C'est bien sûr du matériel "d'ancienne génération", mais le tout est parfaitement compatible FreeBSD, et le prix de la configuration complète est celle du processeur tout seul dans le commerce. Pourquoi se priver ?

Petite estimation à la louche : la valeur du même matériel neuf dépasse les 2700 euros TTC.