Search Results: "pm"

11 June 2006

David Pashley: Class::DBI performance

Class::DBI is a very nice database abstraction layer for perl. It allows you to define your tables and columns and it magically provides you with classes with accessors/mutators for those columns. With something like Class::DBI::Pg, you don't even need to tell it your columns; it asls the database on startup. It's all very cool mojo and massively decreases the development time on anything database related in perl. Unfortunately, as far as I can tell, it has a massive performance problem in its design. One of the features of Class::DBI is lazy population of data. It won't fetch data from the database until you try to use one of the accessors. This isn't normally a problem, except with retrieve_all(). Basically this function returns a list of objects for every row in your table. Unfortunately, due to the lazy loading of data, retrieve_all() calls SELECT id FROM table; and then every time you use an object it calls SELECT * FROM table WHERE id = n;. For a small table, this isn't too bad, but for a large table, it's a killer. I did a little benchmark today to see just how much slower it is over plain DBI. I wrote two functions which iterate over a table, assigning one value to a function (forcing Class::DBI to fetch the data). The table in question contains 635 rows. The code I used was:
use strict;
use warnings;
use Benchmark qw(:all) ;
use Foo;
use DBI;
sub class_dbi  
   for my $foo (Foo->retrieve_all())  
      my $bar = $foo->bar;
    
 
sub dbi  
   my $dbh = DBI->connect("dbi:Pg:dbname=$db;host=$host",$user, $passwd);
   my $sth = $dbh->prepare("SELECT * FROM foos;");
   $sth->execute();
   while(my $row = $sth->fetchrow_hashref())  
      my $bar = $row-> bar ;
    
 
cmpthese(100,  
      'Class::DBI' => 'class_dbi();',
      'DBI' => 'dbi();',
    );
The results:
brick david% perl benchmark.pl
           s/iter Class::DBI        DBI
Class::DBI   10.3         --       -97%
DBI         0.351      2845%         --
Class::DBI is more than 28 times slower than using DBI directly. I'm hoping that someone will now tell me "Oh you just do blah", otherwise I'm going to have to rewrite some of my code. One thing to learn from this is that reduction in development time can often cost you more in other areas, and it's often runtime performance. Update: It appears that the bug is that Class::DBI::Pg does't set the Essential list of columns, so Class::DBI uses the primary column. you can fix this by adding the following to your database modules:
__PACKAGE__->columns(Essential => __PACKAGE__->columns);
Remember you'll need to do that for each of your modules; you won't be able to do it in your superclass, as you won't have discovered your columns yet. This has increased performance, but not massively. New timings (with the addition of using Class::DBI through an iterator):
              s/iter Class::DBI it    Class::DBI           DBI
Class::DBI it   6.35            --           -2%          -94%
Class::DBI      6.23            2%            --          -94%
DBI            0.350         1714%         1680%            --
Update 2: It appears that further speedgains can be made by not using Class::DBI::Plugin::DateTime::Pg to convert the three timestamp columns in my table into DateTime objects.:
              s/iter Class::DBI it    Class::DBI           DBI
Class::DBI it   1.26            --          -11%          -72%
Class::DBI      1.12           12%            --          -69%
DBI            0.350          260%          220%            --

10 June 2006

Barry Hawkins: Mark Pilgrim switches back to Linux from Mac OS X as well

Blog commenter James pointed out to me that the esteemed Mark Pilgrim has recently moved back to Linux for his desktop OS as well. Since Mark’s blog post doesn’t have to be conformed to fit conventions of a major technical publishing site, the style is more conversational. His take on the faux openness of the Mac platform is insightful. My favorite two paragraphs from the entry are the following:
I would like to point out that it is entirely Apple s choice that their operating system does not run on my new Lenovo ThinkCentre. I m not saying it was a bad business decision they are a hardware company, after all but it is particularly galling to realize that if I bought a new Mac, I would be subsidizing the development of an operating system that contains code whose sole purpose is to lock me into a specific hardware platform. I realize that most people don t look at it that way, but there it is.
In many ways, the tale of my switch is more of the same old story. Mac OS X was free enough to keep me using something that was not in my long-term best interest. But as I stood in the Apple store last weekend and drooled over the beautiful, beautiful hardware, all I could think was how much work it would take to twiddle with the default settings, install third-party software, and hide all the commercial tie-ins so I could pretend I was in control of my own computer. Beauty is in the eye of the beholder, and to my eye Apple isn t beautiful anymore. I ve worked around it or ignored it for a long time, but eventually the bough breaks.
Spot on, Mark. I still kick myself for thinking it perfectly normal at one time to have to own a PCMCIA network card just to be able to use WLAN with my Aluminum PowerBooks equipped with “Airport Extreme”. Deciding to “switch back” was almost like realizing I was in this relationship with someone who was taking without giving back, and using manipulative schemes to win my allegiance. Oh yeah, and more Mac zealot whinging in the comments, apparently enough for Mark to have turned off comments on that post.

Steve Kemp: Looks like a shotgun wedding to me

Last night I reinstalled Debian GNU/Linux upon my laptop so that I could have a clean starting point and a simple LVM setup. Why? Well xen-tools has had half-hearted LVM support for a few months, but not complete. And waiting for other people to add fixes has become unbearable. So now I have a 7Gb root partition and a 12Gb LVM group which can be used to create new Xen instances upon. (Or for anything else I guess!) Speaking of Xen Tools. Yesterday was a major day of work. I’ve split up the code from one monolithic script xen-create-image into three simpler programs which are called in turn:

Andres Salomon: rpm makes babies cry

This is an old bug, but an amusing kuro5hin article pointed it out to me: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119185.
Back in the days of Redhat 8 and 9, I had to deal w/ many corrupt rpm databases. Never again. The behavior displayed by Jeff in that bug report makes me pleased that Debian has the formal means (the ctte) to deal w/ such issues (that is, maintainers acting like autistic cunts).

8 June 2006

Zak B. Elep: Hard(?) at Work

In the past few days, I’ve been rather quiet, since I started ripping Sendpage to shreds. After a few days of reading Sendpage::Device and Sendpage::Db, as well as the corresponding design documents, I’ve decided to try coding the few redesign I have been holding up my mind all this time. For now I’m putting my mods inside RCS working with CVS, thanks to Emacs VC-mode. I’ve put up my first status report for Week 1+. I am also currently dist-upgrading to Dapper, Sid, and Eft chroots… while discovering Perl Design Patterns.
05:42 * zakame can't believe he's building Perl from source
05:43 < ajmitch> sick man

Joey Hess: rpm hell

I thought I knew most of what was wrong with rpm, but this bug has opened my eyes to whole new levels of evil. (It's also a textbook example of exactly how not to respond to bug reports.) Description of why using rpm to upgrade a package with /usr mounted read-only can cause the package to silently be removed from the rpm database:
RPM uses a "best effort" algorithm when doing upgrades. What actually happened here is that the previous versions were removed as part of the upgrade process, and the newer versions were installed. At least as much as possible. :-) As many files as could be removed from the old install were, and that install was removed from the RPM DB. As much of the new stuff as could be installed was, but the install of some items failed, so the new packages were not added to the RPM DB.
dpkg's behavior in the equivilant situation is to complain as soon as it can't write to a file, and roll back the package state to the previous version.

7 June 2006

John Goerzen: Usenix

Well, we're back from the Usenix '06 Annual Technical Conference. Overall, a very nice conference. This is the first Linux/Unix conference I've been to since the old LinuxExpo (NOT LinuxWorld) events in the late 90s.

I must say it was quite fun to be around so many intelligent *nix folks. I learned quite a bit, and learned how much I had in common with some (and how little with others). A very nice social at the New England Aquarium Friday night.

Some very interesting speakers, too, with lots of experience to share. I'm glad I was there.

I have only one main complaint about Usenix -- they tried to cram too much into too few days. The conference sessions ran till as late at 6:45PM, with BoFs after that. That left almost no time to see anything of Boston and meant that very few people could actually stick around for all the BoFs. Next year, they should use more days and schedule fewer things in the evenings.

The highlight of the trip, though, wasn't Usenix at all, but instead getting to meet some Boston-area Debian folks Saturday night. Lots of fun, and Mako is as crazy in person as he looks online :-)

Our train trip in each direction was nice, too.

More to come...

6 June 2006

Carlos Villegas: reading, hotspots and repository

This is the second post of the blog for improving the boot process. There are some logistic news and hotspots being identified together with some readings.

>Logistics:<br><br/>Logistics:
  • SVN repository is up at [1]
  • place for webpage was decided and will be ready soon at [2]
  • Project added to the debian wiki at [3]
For the potential hotspots, some have been identified like:
  • reordering bootscripts
  • parallel booting (like with startpar)
  • preloading (like with dynamic readahead)
  • using internal functions in init scripts or dash
  • don't run depmod at run time
Besides, some readings like "System Init scripts and Debian OS" from Henrique de Moraes and the linuces boot process benchmarking are on their way.


[1]svn+ssh://svn.debian.org/svn/initscripts-ng
[2] http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/
[3] http://wiki.debian.org/SummerOfCode2006

5 June 2006

Robert Pickel: My progress so far

I forgot to write a progress report for last week's progress...
Here are some things that I did after submitting an updated proposal:

  • Put a development box together and got it up and running w/ sid.
  • Identified many steps in casper-bottom scripts that can be added to the post install script of the casper-ng package and started to write that script. (Some deal with: kdm, gdm, xscreensaver, and creating the default user)
  • Started to map out the operations of a boot param script.
  • Tested a new way to create a user at creation or boot time w/o a set password.


Problems: Sid broke! - There is an error when trying to build a new iso from scratch.

Plans for this week:

  • Finish up documenting what I have already started to work on. This documentation will be located on the wiki.
  • Finishing up post install script for casper-ng.
  • Continue to work on init script to override defaults.
  • Start working on a post removal script to restore the rootfs to its original state.

MJ Ray: Debian-Legal Package List May 2006

May 2006 traffic discussed bacula cdbs cxxtools db3 db4.2 EiffelStudio ipv6calc ircd-irc2 java*-runtime/compiler libapache-mod-proxy-html libfaad* libx264* libjlha-java maxdb-doc opensaml postgresql sharpmusique sork-* sun-java5-jre tetex tremulous wget xfonts-utils [link to my index]

2 June 2006

DebConf6 Blog: DebConf6 Over - Thanks to all and pictures for the gallery (Posted by The DebConf6 Orga Team)

As you probably know by now: DebConf6 is over! It was an excellent event at a nice location with some amazing network details - such as 1.8km of cable to get all our areas linked into the local network, and having a fiber link into the tower - with 10mbit hubs. We would like to say thank you to all the people who helped to run and organize this conference, taking on tasks such as Additional thanks go to all the people who lent us their hardware, our sponsors for making the event possible in the first place (see the full list at debconf6.debconf.org), and to all the attendees who managed to keep on smiling even when things didn’t always turn out as expected.
While we are at it: There is a central gallery for DebConf6 behind gallery.debconf.org. As it is open for everyone, just create a user there and send a little mail to gallery-admins@debconf.org to get your account activated. We would like to have this as a central point for all pictures taken at DebConf6 (and all prior / following DebConf-Events), so we would really appreciate if you can (in addition to your own gallery) upload the pictures from DebConf6 or all prior events you attended there.

Martin F. Krafft: Keeping an eye on package involvement

I find my developer QA page to be unappropriately long. At the same time, I have completely lost track of which packages I maintain (well, sort of), (am supposed to) co-maintain, and to which packages I've subscribed via the PTS. A script to the rescue! Please excuse that it's bash (which sucks), but there just isn't another more rapid development tool for such petty tasks out there. Without further ado, you can download checkpkgs and give it a whirl:
  # use $DEBEMAIL
$ checkpkgs
  # use explicit email
$ checkpkgs dude@thisrocksmysocks.org
  # use separate PTS subscription email address
$ checkpkgs dude@thisrocksmysocks.org dude-pts@thisrocksmysocks.org
  # use separate PTS subscription email address and $DEBEMAIL
$ DEBPTSEMAIL=dude-pts@thisrocksmysocks.org checkpkgs
The output is quite simply a table of the following form:
hibernate;cameron@patrick.wattle.id.au;0;1;madduck-pts@debian.org
unifdef;bob@proulx.com;0;0;madduck-pts@debian.org
thinkpad;pkg-tpctl-devel@lists.alioth.debian.org;0;1;
The columns are:
  • package name
  • maintainer
  • whether I am the maintainer
  • whether I am a co-maintainer
  • the address with which I am subscribed to the PTS (if at all) (this is either ($1 or $2) or ($DEBEMAIL or $DEBPTSEMAIL))
So from the above output, I know that:
  • I am a co-maintainer of hibernate and I am properly subscribed
  • I am subscribed to unifdef but I am not a maintainer. Since I sponsored the package, I better keep track of it though.
  • I am a co-maintainer of thinkpad, but I have not yet subscribed to the PTS, so I better do this right now.
The script's only a quick hack, but maybe people come to like it. PS: I really need to set up version control again.

Steve Kemp: I don t want to think too much about what I should or shouldn t do

I have a new desktop machine. An AMD3000 with 1Gb of memory. It is almost entirely setup. Only three Xen-related woes: Also gnome-desktop-environment is uninstallable on Sid at the moment. Just when I’d switched all my machines to using it :( So now I have: The two Dell Dimension L800s I used for backup purposes are retired. This is good, they had 128Mb of memory each and were always at 90-100% disk capacity. One to go to my sister in York, the other to the first person who claims it in Edinburgh. Now to find another LCD display …. I have a 19″ and a 15″.

Uwe Hermann: OS Install Experiences - Part 3: PC-BSD [Update]


Note: This article is part of my OS Install Experiences series.
I'll continue with the recently released operating system PC-BSD 1.1, which is based on FreeBSD 6.1. This is actually the first time I installed a BSD-like OS, so I thought it would be a bit of a hassle. But I was surprised to find that the install was really pretty easy (which is a major goal of PC-BSD, as I understand it). I didn't even read a manual or installation instructions or anything... Install
  1. First, I downloaded a PC-BSD 1.1 CD #1 image, burned it on a CD, and booted from that.
  2. The first installer screen is text-based (later it's graphical), and allows you to choose between a normal install ("boot FreeBSD"), install "with ACPI", "safe mode", "single user mode", and "with verbose logging". You can also "escape to loader prompt", or "reboot".
  3. While the installer runs, it merely shows a nice desktop background, pressing any key shows you the boot messages.
  4. After a while you can select a screen resolution for the graphical installer, run fdisk, escape into an "emergency shell", chroot into the root partition, or reboot. Default is to start the installation at a pre-selected screen resolution.
  5. You can choose the language and keyboard layout. Although you can click "back" to return to previous steps in the installer, you can not go back to the language/keyboard selection later!
  6. Partitioning. First, you can choose on which disk to install, then choose the partition to use. The list only shows the primary partitions and an "extended DOS" partition. Device names for disks are a bit different in BSD world. /dev/ad0 (counting starts at 0) is the first disk, /dev/ad0s1 (counting starts at 1) the first "partition" (called "slice" in BSD). It doesn't seem to be possible to install PC-BSD on an extended partition (please correct me if I'm wrong), so I installed it on /dev/hda2 (/dev/ad0s2 in BSD-speak), which is a primary partition. To make things more complex and confusing, a BSD slice can contain multiple "partitions" (not the same as Linux partitions!). I now have /dev/ad0s2a, which is the boot partition, and /dev/ad0s2b, the swap partition. Confused? Me too.
  7. Note that changes made to the partition table seem to be effective immediately, there's no way to go back without losing data! Debian's installer is better at this. The default PC-BSD file system is UFS, btw.
  8. The hardware will be automatically detected (worked quite well for me).
  9. You can now choose to either install the BSD bootloader in the MBR, or install no bootloader at all. Not sure what the best thing for me is here, but I decided to install the BSD bootloader (overwriting GRUB). I might have to re-install GRUB (and tell it about PC-BSD) if the BSD bootloader cannot boot the other (Linux) OSes.
  10. Now I must enter the root password, and I can also create another user. I noticed that passwords can only contain alpha-numeric characters (no %$ ,.#+!? and so on). WTF? They can't be serious... Also, you must enter a real name for the normal user, it won't let you continue until you type something... Pretty annoying. There's a checkbox called "Auto-Login User?" which is enabled by default, but I didn't find out what exactly that does...
  11. The network is successfully auto-configured via DHCP. I was not asked for a hostname, but typed hostname after the install and I got PCBSD.localhost.
  12. Reboot. The CD is not ejected automatically, you have to remove it manually before booting up.
  13. I'm asked to insert CD 2 (language packs), which I don't have (or want), as I only burned CD 1. Clicking "abort" does the trick, and I can continue with English as the default language.
  14. Finally, I'm dropped into a KDE session, and that's it.
Security That's it. Comments, suggestions, flames? Update 2006-06-02: Added IPv6 netstat/sockstat output.

1 June 2006

Martin Zobel-Helas: Bug Squashing Marathon

As i already wrote, i am currently organizing a couple of Bug Squashing Parties this fall. My idea is that we have up to four or five BSPs on one weekend around the globe, and this repeated on three weekends directly after the base freeze. This should help us to get the RC count down to some reasonable number so we can release Etch in - this time. As i have been asked to stick to iso 8601 or rfc 3339 date format (yes, i should have thought about this before sending out the announcement), here are the current planed dates (in a better readable format for international readers):
  1. August 11th, 2006 - August 13th, 2006: Testing d-i and fixing bugs in the installation process
  2. September 08th, 2006 -September 10th, 2006: Testing upgrades from pre-release etch and sarge and fix remaining bugs
  3. October 06th, 2006 - October 8th, 2006: Fixing remaining bugs in core packages
The following places so far have been offered to host a BSP: I still hope we get round about 15 different locations world-wide for all events. If none of the dates above meet your diary, but you would be able to host a BSP on a different date within that timeframe, fine with me, just commit it to the wiki. Or your place is not yet listed, do the same. There is not much you need to host a BSP, just online connection, a room/place where the actual bug squashing will happen and a place where non-local DDs could find a place to sleep. See here for more information. Even so it will be a bit stressful i still plan to attend on all of the above weekends to one BSP in Europe.

31 May 2006

Aigars Mahinovs: Debconf6 day 7: Lightning and splashing

May 20th. The day started with an important meeting that was aimed at getting our priorities straight for the Google Summer of Code (SoC) program. Many good and some not so good applications have been proposed to Debian by students from all around the world. Now it was the time for Debian to choose the best of these proposals and rank them according to our priorities. We did not know how many applications Google will grant us, so we had to get our rankings right through the whole scale. We want to be sure, for example, that after this meeting project ranked 5th would be less useful to us then any of the first four, but more useful then all others. The discussions were short and very on topic. Rankings were determined quickly and mentors for all selected project were appointed. AJ leading the BOF was very helpful in making decisions when they had to be made. Now we only need to wait and see how many application slots Google will give us. A set of lightning talks followed. The talks were very different: some were funny, some were serious, some were too fast, some got to get boring. The one talk I want to highlight especially is a talk by Joey Hess about what Debian can learn from Gentoo. Especially handling of configuration files on package upgrades was raised as an example. Gentoo is an interesting distribution that is developing very separate from Debian, so it is quite possible that upon closer inspection there are other things that Debian could use from what Gentoo is doing. That only needs some closer inspection by someone with in-depth knowledge in both systems. Right after the lightning talks I want off to prepare for the second group photo - the fun photo in the pool. It was planned just before lunch. The start was small and easy - 15 people easily make a swirl by the side of the pool. As people continue to join maintaining order becomes harder and harder despite all efforts of self-organization on the part of all people involved. The swirl grows, deforms beyond recognizability and then straightens out again, just to be deformed again by newcomers. Just like Debian. When the number of people grew to 50 I decided that we no longer can get a better swirl in any reasonable timeframe, so I called that shot done and called everyone to group into a single bunch for a different take on the fun group photo. That was much easier except for the splashing fight that broke out in the back rows and took over the whole group as soon as I called that the second fun group photo is also done. After that all went for lunch. The next thing I went to was the discussion about the Debconf7. Apparently it was not supposed to be a public discussion, but after a while the consensus of open discussion prevailed and candidate cities for Debconf7 started their presentations. Edinburgh was the first candidate - they had it all: good transport connectivity, good Internet, nice facilities, nice living places. It was not clear about the food and the prices were very high - 30 EUR per person per day, not including food. As the presenter from next city could not come because of visa problems, stockholm presented for her. Sarajevo is the capital of Bosnia and the organizers have all needed problems solved already: facilities are provided by an UAE company (so they are the best one can get for any kind of money), 20 Mbit of sustained throughput Internet connectivity, very cheap food with good adaptability, 15 minutes from the airport. In total the Sarajevo Debconf would cost around 15-17 EUR per person per day. After that "Brixon boys" presented their city for Debconf7. The presentation was more concentrated on skying and other relaxation issues then on the questions that are more relevant to the organization of such conference as Debconf. >From this meeting and from talking to people later on I have two conclusion on the matter: 1. it would be very good to make a decision on the next Debian conference place slightly more open and also pool people about issues that concern them (which is planned now), but I still think that one person should be entitled to make the final decision; 2. I think Sarajevo is the best choice for next year for many reasons, but most important because of cost. The less it costs per person to hold a Debconf, the more people can be there and the more people could get sponsored travel. Some people might even agree to come to Debconf by a bus, which should be quite possible from most of continental Europe it the conference is in Sarajevo. It would be much cheaper and would still be not as exhausting as the 40 hour flight mambo jumbo that I had to take to get to this event here. Bubulle spoke afterward summarizing the i18n situation in Debian before Debconf6 and the discussions that took place at Debconf6 that intend to improve it. It was a good summary, so you only need to watch the i18n BOF videos if you will be working in the infrastructure. CAcert signing event was conducted after that. I have no idea of the real use of those certificates, but some apparently do. As the final discussion a meeting specifically about the Google Summer of Code i18n infrastructure project was conducted. We were deciding what shall we ask Gintautas (the student that proposed the project) to do, how will we define the scope of his work, so that we can have a definite way of determining if he did that or not be the end of the SoC program. The final decision will ultimately be on me. The result of this meeting was that we will ask Gintautas to take the current code of Pootle and make of it an translation system with clearly separated backend where other translation frontends could be plugged into. After that (optionally) he should work to create such plugins in cooperation with other Debian i18n and Pootle developers and also continue refactoring and remaking the codebase to allow for other plugin development. But the essential part of Gintautas contribution will be a clearly separated translation backend with Pootle frontend and a stable API between them. After the SoC will be over Gintautas will be welcome to present his further vision on the whole infrastructure at the I18N meeting in Extramadura. This work will also serve as a research base to clarify Debian i18n needs, so it is very well possible that at Extramadura it would be decided to abandon the current code and make a new system from scratch in Zope 3. :)

Jaldhar Vyas: jaldhar.vyas@linspire.com

I'm in San Diego at the moment. As of today I shall be contracting for Linspire building packages for their Debian derived Linux distribution and doing some KDE development.

Jeff Bailey: Montr al goes non-smoking

This lovely city is about to get nicer for me. Montr al is going non-smoking in all indoor enclosed public spaces. The law takes effect in about 40 minutes.

It's tempting to go play pool at midnight, but:

1) I'm sure it'll take a week or two for the residue smoke to actually clear out of the pool hall.
2) I'm *tired*

But there needs to be a game sometime soon... I'm thinking next Tuesday, 11pm, Berri and Mont-Royal, right above the Jean Coutu.

30 May 2006

Philipp Kern: Load Cycle Fix for Toshiba HDDs

Toshiba HDDs, especially in Apple laptops, are vulnerable to a high rate of load cycles (about one per second instead of a few per hour) on Linux. This has a major impact on the lifetime of the device. I had two HDDs breaking in short time intervals (less than a year), due to exactly this issue. You could fix this problem by putting "apm = 254" into /etc/hdparm.conf. But please note that 255, which should turn off APM, does not fix the problem. The load/unload cycles just continue. You could verify the fix by looking at the count in the output of the following snipplet. If the value does not increase after two minutes you should be safe and enjoy a much longer lifetime of your drive:
smartctl -a /dev/hda grep 'Load_Cycle_Count' awk ' print $10 '

Ian Murdock: Gimmie innovation

Stephen O’Grady: “[I]nnovation is reflective of the developer, not the development model.”

Next.

Previous.