RTFM

[Read This Fine Material] from Joshua Hoblitt

WinXP high CPU utilization under libvirt/KVM

| 0 comments

I recently created a Win XP 32bit VM to test the win32 Bacula file daemon binary.  I used my libvirt on top of Centos5.6 environment for this testing.

[root@apollo3 ~]# uname -rm2.6.18-238.9.1.el5 x86_64[root@apollo3 ~]# yum info virt-managerLoaded plugins: fastestmirror, priorities, securityLoading mirror speeds from cached hostfile * addons: mirror.san.fastserv.com * base: mirror.rocketinternet.net * extras: mirror.rocketinternet.net * updates: mirror.hmc.edu214 packages excluded due to repository priority protectionsInstalled PackagesName       : virt-managerArch       : x86_64Version    : 0.6.1Release    : 13.el5.centosSize       : 5.4 MRepo       : installedSummary    : Virtual Machine ManagerURL        : http://virt-manager.org/License    : GPLv2+Description: Virtual Machine Manager provides a graphical tool for administering           : virtual machines such as Xen. It uses libvirt as the backend           : management API.

I then noticed that the instance was constantly keeping it’s two KVM vcpus at 100% despite the windows task manager claiming the instance was completely idle.  The windows shell was also very responsive through VNC.  After some reasearch, it seems that this problem has been fairly common with win2k/winxp on top of libvirt/KVM.  Eg., Example Google Query It seems that this is actually the fault of the way virt-manager sets the feature flags in the libvirt qemu/KVM configuration file.

When you select “Microsoft Windows XP (x86)” as the OS type it sets the feature flags as:

  <features>
    <pae/>
  </features>

However, for “Microsoft Windows Vista” it sets them as:

  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>

Supposedly, Win* selects it’s HAL layer at install time and this effectively permanently enables/disable APCI support for the platform. Going back and changing the libvirt configuration file and restarting the VM won’t fix it post OS installation.

This forum thread claims that you can change the HAL layer with the boot media. I tried that method twice without resolving the CPU burn problem.

The really odd thing is that this did change the driver listed in the device manager uder “computer” to be the correct “MPS Multiproccessor PC”.  Supposedly, you can change this driver manual to one of the more generic HAL types and this will fix the CPU usage at the cost of disabling SMP support; I wasn’t interested in that solution so I never tried it.  The solution I used was to create a new image with OS Type set to Vista as outlined above.

default password for Qlogic SANbox 1400 Fibre Channel Switch

| 0 comments

Per the sticker the comes on the front of the chassis:

Telnet: 10.0.0.1
Login: admin
Password: password

While the FC ports come up fairly fast, the Ethernet interface takes a bit longer (several minutes?).  I have 6 of these units and they all came with the same defaults.  All of the units are currently running firmware v5.0.10.0 but some of them came out of the box with an earlier version.  This should apply to SKUs SB1404-10AJ-E and SB1404-10AS.

Blog Resurrection…

| 0 comments

or “I’m not dead yet”.

It doesn’t seem like it could possible have been so long but my (this) blog has been down since late 2009.  This can be largely blamed on the move to a new city (Tucson) with a new ISP (Cox Communications) which conveniently blocks both port 25 and port 80 for residential customers.  I’m sure the excuse is spam control but my assumption is they think it’s reasonable to charge $200+/mo for a “business” cable account just to host a vanity domain at home.  Anyway, SMTP was fixed by switching from Dyn Email Backup MX to the awesome Dyn Email Forward. HTTP traffic was more difficult to deal with.  For awhile I tried having a HTTP 302 forward from joker.com to my home server on an alternate port.  I quickly gave that up as I was concerned about having to support the alternate port forever or risk braking stored links.

The other major issue was that the blogger atom dump -> MT importer had been broken for years.  This stranded a bunch of content that I had in my first blog (on blogger).  The blogger “ssh” static content push to your own remote shell account kept breaking for weeks at a time so I bailed out and switched to MT.  The importer has apparently been fixed and allowed for a grand [puny] blog reunifications.

I finally broke down a few weeks ago and moved MT over to an AWS ec2 instance.  Shortly thereafter I ran out of time to mess with it.  I see that Google is now refer people searching for my name to the blog so it’s time to actually start using it again.  I have several long technical post planned to force me to organize some notes I’ve been keeping.

I also understand that MT is no longer in vogue and that folks are moving over to WordPress. An engine/theme update may happen if I can ever find the time.

Rewriting MySQL queries to join on derived tables

| 0 comments

When you IN(), ANY(), etc. in a MySQL query the optimizer is unable to do anything intelligent and you effectively end up with a cross product query.  The results of rewriting this query that looks for duplicate entries (so they can be removed and a UNIQUE() index installed) to join against a derived table is a pretty impressive improvement.

 

mysql> explain select so_id, ext_id, dir_id from storage_object where dir_id in (select dir_id from (select dir_id, dirname, parent_id, count(*) from directory group by dirname, parent_id  having count(*) > 1 ) as foo);
+----+--------------------+----------------+-------+---------------+-------------+---------+------+----------+----------------------------------------------+
| id | select_type        | table          | type  | possible_keys | key         | key_len | ref  | rows     | Extra                                        |
+----+--------------------+----------------+-------+---------------+-------------+---------+------+----------+----------------------------------------------+
|  1 | PRIMARY            | storage_object | ALL   | NULL          | NULL        | NULL    | NULL | 29105384 | Using where                                  |
|  2 | DEPENDENT SUBQUERY |      | ALL   | NULL          | NULL        | NULL    | NULL |     1612 | Using where                                  |
|  3 | DERIVED            | directory      | index | NULL          | parent_id_2 | 263     | NULL |   174729 | Using index; Using temporary; Using filesort |
+----+--------------------+----------------+-------+---------------+-------------+---------+------+----------+----------------------------------------------+
3 rows in set (3.62 sec)
mysql> explain select so.so_id, so.ext_id, so.dir_id from storage_object as so join (select dir_id, dirname, parent_id, count(*) from directory group by dirname, parent_id  having count(*) > 1) as foo on so.dir_id = foo.dir_id;
+----+-------------+------------+-------+---------------+-------------+---------+------------+--------+----------------------------------------------+
| id | select_type | table      | type  | possible_keys | key         | key_len | ref        | rows   | Extra                                        |
+----+-------------+------------+-------+---------------+-------------+---------+------------+--------+----------------------------------------------+
|  1 | PRIMARY     |  | ALL   | NULL          | NULL        | NULL    | NULL       |   1612 |                                              |
|  1 | PRIMARY     | so         | ref   | dir_id        | dir_id      | 8       | foo.dir_id |    918 |                                              |
|  2 | DERIVED     | directory  | index | NULL          | parent_id_2 | 263     | NULL       | 174729 | Using index; Using temporary; Using filesort |
+----+-------------+------------+-------+---------------+-------------+---------+------------+--------+----------------------------------------------+
3 rows in set (3.95 sec)

 

Darwin bobbleheads – too bad this isn’t a joke

| 0 comments

In celebration of the bicentennial of Charles Darwin?s Birthday, 1809 ? 2009, and the sesquicentennial publication of his seminal work, On Origin of the Species, The University of Hawaii at Manoa Library is sponsoring a fundraiser featuring Charles Darwin Bobbleheads.

Through March 31st, the UH Library is accepting pre-sales orders of the commemorative Charles Darwin Bobblehead. The bobblehead fundraiser will support Library Enrichment events such as exhibits in the Bridge Gallery, lectures, readings, and workshops for the campus community.

These ?little Darwins? come complete with Darwin’s birth and death dates inscribed on the base (you’ll never forget Darwin Day again!). They weigh about 550g (1 lb, 3 ounces for those who cannot abide the metric system), and they stand approximately 19 cm (a.k.a., 7.5 inches) tall. They are made of polyresin.
Every Darwin fan and every biology lab needs one of these — what better way to assure the success of your experiments (and thought processes) than to have Charles Darwin overseeing your creative endeavors? It is the perfect gift for the scientist who has everything!

Advance order your Charles Darwin Bobblehead for $25/each at the Business Window (956-7203) on the first floor of Hamilton Library, Monday ? Saturday 8:30 a.m.?4:30 p.m.; Sunday 12:00 p.m. -7:00 p.m. For more information, please contact Teri Skillman, 956-8688 or skillman@hawaii.edu.

This message was sent on behalf of UH Manoa Library.
Please do not reply to this message.
It was sent from an address that cannot accept incoming email.

Announcement ID number: 1235616721-24652
Announcement distribution:
– Faculty at UH Manoa
– Staff at UH Manoa