Thursday, 25 June 2009

Error message FAIL

I'm trying to get libvirt working, just to play with it.  Here's the error:

libvir: Network Config error : cannot create bridge 'virbr0': Package not installed

Package not installed?  But the bridge utilities are installed.  After much googling, I discovered it's a bridge-utils error message, and here's my translated version:

Ethernet bridging support isn't enabled in the kernel

lrn2writeerrormessages.  kthx.

Tuesday, 16 June 2009

nVidia blocking signal problem fixed

have been experiencing this bug since the 180.35 nVidia drivers were released.  The dreaded blocked signals bug.  The .37 driver was supposed to fix it, and did for many people, but not me.  Neither did .41, .44, .51, or the latest ones, 180.60.  This wasn't a big problem,  I reasoned I'd just wait until it was actually fixed and continue using the 180.29 drivers.  That waiting ended today when I upgraded to kernel 2.6.30 and discovered the .29 drivers don't build against that kernel.  Curses.

Wednesday, 3 June 2009

Profiling PHP Code

I have a PHP script I wrote for my research that takes stupidly long time to run. Why? I don't know.  So on an off chance of finding something useful, I put "PHP profiling" into google.

So it turns out that PHP profiling is a huge topic, there are many websites ready to provide HOWTOs and tutorials for a zillion different techniques.  And, like everything in the computer world it seems, the solution is easy and sifting through all useless advice and "type-this-random-thing-into-your-console" is what takes the time.

Here's what gentoo users need to know:

  1. emerge xdebug

  2. Edit /etc/php/php-cli/ext/xdebug.ini , set xdebug.enable_profiling="1", and I also had to increase my max_nesting_level to "1000".  It took forever to figure this out, ALL the documents say "oh, just put the settings in php.ini.". WRONG.  They get ignored in there.

  3. Install kcachegrind, and use it to load the profile dumps now being written in /tmp/cachegrind*