Windows BCD file is just a registry hive 0

The Vista/Windows 7 Boot Manager data in Boot/BCD is simply a registry hive and can be read using a tool like reged.

It contains stuff like /Description/TreatAsSystem, /Description/GuidCache and a whole bunch of guids under /Objects. Presumably, the actually interesting data is there, but unfortunately, it's all binary.

A guy named Geoff Chapell has some info on what it all might mean.

Downloading drivers for old 3ware products 0

On the download site, make sure to select the All Releases and go through the form wizard. Do not use Click here to View all our products - it'll lead you to a huge, inpenetrable list of possible downloads for some products.

Use different terminal colors while inside ssh 0

Since this was a source of confusion for me in the past, I like to make it visually obvious when I'm inside an ssh session in gnome-terminal, vs. on the local machine. This is the best solution I have found so far:

ssh-done() {
        setterm -term linux -inversescreen off;
}
ssh() {
        setterm -term linux -inversescreen on;
        /usr/bin/env ssh $*;
        ssh-done;
}

The reason why ssh-done is exposed as a separate function is that when ending ssh through Ctrl+C (for example, while at the password prompt), this gives you the ability to manually reset the terminal to normal again.

setterm in theory would also allow you to manually select a foreground and background color, though this didn't work to well for me; in particular, it broke in various cases when commands tried to colorize their own output.

Totally awesome would be the ability to script gnome-terminal to switch the profile, but this doesn't seem to exist yet.

Django: Flexible date form fields accepting (almost) any input 1

At critify, we do a lot of copy & paste. Sometimes, that means copy & pasting a date from another site into a Django DateTimeField on our site. This can be tedious, because Django only supports a fixed number of strict input formats, while the actual input can at times be something quite freeform. So I decided that what was needed were date form fields that would make a good attempt at parsing the input.

Here's what you need:

  • python-dateutil, which provides the parser.
  • This file, which implements DateTimeField and DateField form field classes which use python-dateutil to process the input.

With that available, the actual code is quite simple:

from djutils.forms.fields import formfield_callback

class YourForm(ModelForm):
    formfield_callback = formfield_callback
    class Meta:
        model = YourModel

The formfield_callback will ensure that for every DateField or DateTimeField that your model has, the appropriate form field with dateutil-parsing support will be generated.

Of course, you can use these fields manually as well:

from django import forms
from djutils.forms.fields import DateField

class MyForm(forms.Form):
    std_date = forms.DateField() # < - Uses the standard DateField
    parsed_date = DateField()  # <- Uses the custom DateField

This should work well enough; we can now put something like 8th of January into the form, and it'll be parsed into the correct date.

"8th of January"? My site is in German! Fortunately, while not supporting it out of the box, python-dateutil is flexible enough to allow for internationalization as well. You need to get:

  • Yet another file, which adds support for German date strings to python-dateutil (i.e. "Janauar", "Montag", ....). If you need to support a different language, you can use that file as a template.

The way internationalization is done with python-dateutil is that you implement a parserinfo class for a given language. We need to tell our custom form fields to use the German parserinfo provided by the file above:

from djutils.forms.fields import get_formfield_for
from pyutils.date import GermanParserInfo

class YourForm(ModelForm):
    def formfield_callback(field):
         # If it's a date-related field, get one of our custom form fields
         result = get_formfield_for(field, parserinfo=GermanParserInfo())
         # Otherwise, use the default form field.
         return result or field.formfield()
    class Meta:
        model = YourModel

That's basically it. You might want to create a base form class that you can inherit from for DRY purposes.

By the way, my module containing the German parser info also has a MultiParserInfo helper that may be useful to some:

parserinfo=MultiParserInfo(parsers=[GermanParserInfo()])

This will give you a parser that supports both German date names, and the original English date names as a fallback. If you need to support even more languages, you could too:

parserinfo=MultiParserInfo(parsers=[GermanParserInfo(), FrenchParserInfo()])

Properly sending contact form emails and how to do it in Django 0

Ever since I decided to use SpamStopsHere (their excellent, by the way) I noticed that some emails sent to me by one of my site's contact form didn't pass their SPF check.

It turns out that apart from your normal "From" sender, an email message also has an envelope sender specified in the Return-Path header. The first is considered to be the author, the second refers to who is responsible for actually sending the message.

So my site sent those contact form emails to me using as the sender whatever the user specified as his email address in the form - in both the From and Return-Path path fields. Whenever the user's email domain had SPF records installed, the validation would run the user's email against my mail servers and thus obviously fail.

The solution then is to use as the Return-Path an address of your own. How to do this in Django? It's really simple, but totally non-obvious. This is per Ticket 9214 and Changeset 9842 (so you need at least 1.1).

connection = SMTPConnection(fail_silently=fail_silently)
headers = {'From': 'users@email.address'}  # From-header
from_email = 'bounce@mysite.com'           # Return-Path header
EmailMessage(subject, message, from_email, recipient_list,
                   connection=connection, headers=headers).send()

Note that we need to work with ``EmailMessage`` directly - django.core.mail.send_mail doesn't provide an option for custom headers.

If you are using django-contact-form, it unfortunately doesn't support custom headers out of the box either, so you need to apply a patch. Then, the following should work:

class MyContactForm(AkismetContactForm):
    def __init__(self, *args, **kwargs):
        super(self.__class__, self).__init__(*args, **kwargs)
            self.subject = "Contact Form"
            self.template_name = "site/pages/contact_email.txt"
            # Return-Path header, e.g. bounce@mysite.com
            self.from_email = settings.DEFAULT_FROM_EMAIL
            # From-header
            self.headers = \
                lambda: {'From': "%s < %s>" %
                    (self.cleaned_data['name'], self.cleaned_data['email'])}

Clickable URLs in Android TextViews 6

Android's TextView widget can contain clickable URLs. It can easily make web addresses open in the browser, or connect phone numbers with the dialer. All that is amazing compared to the last GUI framework I used, Delphi's once great VCL).

Unfortunately, both TextView and the Linkify utility it uses basically hardcode URL click handling to Intents, by way of the URLSpans they create. What if we want the link to affect something within your own Activity, say, display a dialog, or enable a filter?

For example, in Autostarts, if the user's filters cause the application list to be empty, I wanted to display an explanatory message, and provide a quick and easy way for the user to rectify the situation, i.e. lead him towards the filter selection dialog. Making the whole text clickable is hard to get right visually, and I didn't like the idea of a button too much. A link within the text seemed perfect.

Now, we could just use a custom URL scheme of course, and register our Activity to handle Intents for that scheme, but that seemed much too heavy, if not hacky. Why shouldn't we be able to just hook up an onClick handler?

As mentioned, URLSpan doesn't allow us to change the way it handles clicks (it always sends off an Intent), but we can create a subclass:

static class InternalURLSpan extends ClickableSpan {
	OnClickListener mListener;

	public InternalURLSpan(OnClickListener listener) {
		mListener = listener;
	}

	@Override
	public void onClick(View widget) {
		mListener.onClick(widget);
	}
}

That looks pretty decent. Actually using that class it is tougher. There is no way to tell TextView or Linkify to use our custom span. In fact, Linkify actually has a method (applyLink) that would be nearly perfect to override, but declares it final.

So, we end up having to generate the spans manually; note nice, but hey, it works.

SpannableString f = new SpannableString("....")
f.setSpan(new InternalURLSpan(new OnClickListener() {
        public void onClick(View v) {
            showDialog(DIALOG_VIEW_OPTIONS);
        }
    }), x, y, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

We probably also want the user to jump to your link my moving the focus (e.g. using the trackball), which we can do by setting the proper movement method:

MovementMethod m = emptyText.getMovementMethod();
if ((m == null) || !(m instanceof LinkMovementMethod)) {
    if (textView.getLinksClickable()) {
        textView.setMovementMethod(LinkMovementMethod.getInstance());
    }
}

Android: Determine if running in emulator 1

if ("1".equals(SystemProperties.get("ro.kernel.qemu")) {
    // Emulator
}

[via]

Two quick Android notes 0

  • If Eclipse hangs while "building workspace", try killing any running adb processes in the background. There actually seem to be a variety of possible causes, but when using the ADT Eclipse plugins, this might work.
  • Android Market Downloads not starting seems like a common issue. I used to have this problem a lot, and most of the time, rebooting the device would fix it. But, a couple days ago, even that stopped helping. After lots of random experimenting, I can happily report that I think I found what 95% of the time caused the issue (in my case anyway, YMMV): It turns out I had disabled the Google Talk Boot Receiver using Autostarts, ironically my own app. For some strange reason, this seems to prevent the Market from downloading. It might then also explain why rebooting used to help - I probably just used to occasionally shutdown the Google Talk service (shoutout to Advanced Task Manager), which then started all the trouble.

Syncing custom logcheck rules 0

I love logcheck, but I consistently find I need to use a number of custom rules to keep the noise down. Managing those rules in a central source control repository makes sense if you need to maintain multiple servers, but logcheck makes this difficult by requiring your rule files to be placed in the same directories as the builtin default rules.

To work around this issue I have written a small Python script that will symlink the rule files from your repository into the appropriate logcheck directories. The git repository includes the custom rules I am personally currently using, but you can of course easily replace those with your own.

Benchmark Dump 1

While setting up a new server recently, I spent a bit of time doing some basic benchmarks, and I thought it couldn't hurt just putting them out there. It's really just the raw data I collected, without analysis or commentary. Also, at this point, if a piece of information isn't listed here, I likely don't have it any more.

The hardware is a Intel Xeon L5410A 4x 2.44 Ghz with 16 GB Ram (unless otherwise noted). The ext3 filesystem was used for all tests.

    Ubuntu Hardy, 8GB RAM

    time git clone [linux-kernel]

    2075 KiB/s
    
    real 5m43.632s
    user 2m49.540s
    sys 0m7.720s

    time tar -czf linux.tar.gz linux-git/

    real 0m38.317s
    user 0m37.460s
    sys 0m1.580s

    Ubuntu Jaunty, 8GB RAM, on LVM

    time git clone [linux-kernel]

    2072 KiB/s
    
    real 5m39.452s
    user 2m49.040s
    sys 0m7.660s

    time tar -czf linux.tar.gz linux-git/

    real 0m37.786s
    user 0m36.140s
    sys 0m1.650s

    (repeat)

    time git clone [linux-kernel]

    2061 KiB/s
    
    real      5m36.951s
    user     2m48.430s
    sys       0m7.980s

    time tar -czf linux.tar.gz linux-git/

    real       0m37.812s
    user      0m36.100s
    sys        0m1.700s

    bonnie++

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer      32G 47133  73 50981  13 25721   4 39083  57 54106   5 368.9   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 34523  60 494559  99  1708   2 14833  23 +++++ +++  1132   2
    elsdoerfer,32G,47133,73,50981,13,25721,4,39083,57,54106,5,368.9,1,256,34523,60,494559,99,1708,2,14833,23,+++++,+++,1132,2

    iperf

    939 MBit/s

    (repeat)

    iperf

    931 MBit/s

    ./nbench

    BYTEmark* Native Mode Benchmark ver. 2 (10/95)
    Index-split by Andrew D. Balsa (11/97)
    Linux/Unix* port by Uwe F. Mayer (12/96,11/97) 
    
    TEST                : Iterations/sec.  : Old Index   : New Index
                        :                  : Pentium 90* : AMD K6/233*
    --------------------:------------------:-------------:------------
    NUMERIC SORT        :          1108.5  :      28.43  :       9.34
    STRING SORT         :          246.16  :     109.99  :      17.02
    BITFIELD            :      4.5177e+08  :      77.49  :      16.19
    FP EMULATION        :          241.92  :     116.08  :      26.79
    FOURIER             :           25098  :      28.54  :      16.03
    ASSIGNMENT          :           33.36  :     126.94  :      32.93
    IDEA                :          6721.3  :     102.80  :      30.52
    HUFFMAN             :          2206.8  :      61.19  :      19.54
    NEURAL NET          :            49.6  :      79.68  :      33.52
    LU DECOMPOSITION    :          1563.5  :      81.00  :      58.49
    ==========================ORIGINAL BYTEMARK RESULTS==========================
    INTEGER INDEX       : 80.788
    FLOATING-POINT INDEX: 56.897
    Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
    ==============================LINUX DATA BELOW===============================
    CPU                 : 4 CPU GenuineIntel Intel(R) Xeon(R) CPU           L5410  @ 2.33GHz 2333MHz
    L2 Cache            : 6144 KB
    OS                  : Linux 2.6.28-11-server
    C compiler          : gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
    libc                : libc-2.9.so
    MEMORY INDEX        : 20.857
    INTEGER INDEX       : 19.652
    FLOATING-POINT INDEX: 31.557
    Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38
    * Trademarks are property of their respective holder.

    Ubuntu Hardy, 512MB RAM, on LVM (read-ahead 8192)

    bonnie++ -s 1g -n 2

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 54938  82 59756  15 38555   8 68071  92 119171  11 674.0   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                      2 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    elsdoerfer,1G,54938,82,59756,15,38555,8,68071,92,119171,11,674.0,1,2,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

    bonnie++ -s 1g -n 256

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 57688  87 60005  15 36878   7 70054  94 116765  11 697.2   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 39843  66 446376 100  1778   2 14549  22 +++++ +++  1130   2
    elsdoerfer,1G,57688,87,60005,15,36878,7,70054,94,116765,11,697.2,1,256,39843,66,446376,100,1778,2,14549,22,+++++,+++,1130,2

    Ubuntu Hardy, 512MB RAM, on LVM (read-ahead 8192)

    bonnie++ -s 1g -n 2

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 61444  93 60359  16 27047   5 38587  58 63769   6 674.7   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                      2 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    elsdoerfer,1G,61444,93,60359,16,27047,5,38587,58,63769,6,674.7,1,2,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

    bonnie++ -s 1g -n 256

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 50989  95 61399  15 26720   5 32579  59 63642   6 703.4   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 39059  66 439526 100  1763   2 17369  27 +++++ +++  1203   2
    elsdoerfer,1G,50989,95,61399,15,26720,5,32579,59,63642,6,703.4,1,256,39059,66,439526,100,1763,2,17369,27,+++++,+++,1203,2

    Ubuntu Hardy, 512MB RAM, on LVM (read-ahead 16384)

    bonnie++

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 55044  90 60922  16 36693   8 47231  75 124815  15 685.4   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                      4 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    elsdoerfer,1G,55044,90,60922,16,36693,8,47231,75,124815,15,685.4,1,4,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

    Ubuntu Hardy, 512MB RAM, on LVM (read-ahead 4096)

    bonnie++ -s 1g -n 4

    Version 1.03c       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    elsdoerfer       1G 58692  90 63051  17 31598   6 62978  88 92682   9 691.7   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                      4 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    elsdoerfer,1G,58692,90,63051,17,31598,6,62978,88,92682,9,691.7,1,4,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,++

    Ubuntu Hardy, KVM VM (non-virtio, 2GB RAM)

    time git clone [linux-kernel]

    2058 KiB/s
    
    real 5m52.794s
    user 2m50.330s
    sys  0m17.260s

    Ubuntu Hardy, KVM VM (virtio, 2GB RAM)

    time git clone [linux-kernel]

    2059 KiB/s
    
    real 5m52.455s
    user 2m50.430s
    sys 0m14.470s

    time tar -czf linux.tar.gz linux-git/

    real   0m40.305s
    user  0m37.910s
    sys    0m2.080s

    iperf

    850 Mbit/s

    Ubuntu Hardy, KVM VM (virtio disk, pcnet network, 2GB RAM)

    iperf

    73 Mbit/s

    Ubuntu Hardy, KVM VM (virtio, 8GB RAM, 1CPU, 35GB disk)

    bonnie++ -s 32g -n 256

    Version 1.03b       ------Sequential Output------ --Sequential Input- --Random-
                                   -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    vm1             32G 30618  50 30184   5 21731   4 35322  56 40786   5 280.2   2
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 41823  50 +++++ +++ 11834  11 44915  53 +++++ +++  4866   5
    vm1  32G  30618,50    30184,5          21731,4    35322,56    40786,5    280.2,2    256 41823,50,+++++,+++,11834,11,44915,53,+++++,+++,4866,5

    (repeat)

    bonnie++ -s 4g -n 16

    Version 1.03b       ------Sequential Output------ --Sequential Input- --Random-
                            -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    vm1              4G 33773  56 48037   8 45177  16 59915  96 349013  85 12613 100
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                     16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    vm1,4G,33773,56,48037,8,45177,16,59915,96,349013,85,12612.9,100,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

    ./nbench

    BYTEmark* Native Mode Benchmark ver. 2 (10/95)
    Index-split by Andrew D. Balsa (11/97)
    Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
    
    TEST                : Iterations/sec.  : Old Index   : New Index
                        :                  : Pentium 90* : AMD K6/233*
    --------------------:------------------:-------------:------------
    NUMERIC SORT        :          1139.8  :      29.23  :       9.60
    STRING SORT         :          231.36  :     103.38  :      16.00
    BITFIELD            :      4.3024e+08  :      73.80  :      15.42
    FP EMULATION        :             248  :     119.00  :      27.46
    FOURIER             :           24781  :      28.18  :      15.83
    ASSIGNMENT          :          32.415  :     123.35  :      31.99
    IDEA                :          5663.5  :      86.62  :      25.72
    HUFFMAN             :          2433.2  :      67.47  :      21.55
    NEURAL NET          :           49.58  :      79.65  :      33.50
    LU DECOMPOSITION    :            1559  :      80.77  :      58.32
    ==========================ORIGINAL BYTEMARK RESULTS==========================
    INTEGER INDEX       : 78.957
    FLOATING-POINT INDEX: 56.595
    Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
    ==============================LINUX DATA BELOW===============================
    CPU                 : GenuineIntel QEMU Virtual CPU version 0.9.1 2332MHz
    L2 Cache            : 2048 KB
    OS                  : Linux 2.6.24-23-server
    C compiler          : gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
    libc                : libc-2.7.so
    MEMORY INDEX        : 19.909
    INTEGER INDEX       : 19.550
    FLOATING-POINT INDEX: 31.390
    Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gc

    Ubuntu Hardy, OpenVZ VE (1GB disk, 256 RAM) inside KVM VM (virtio, 8GB RAM, 1CPU, 35GB disk)

    ./nbench

    BYTEmark* Native Mode Benchmark ver. 2 (10/95)
    Index-split by Andrew D. Balsa (11/97)
    Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
    
    TEST                : Iterations/sec.  : Old Index   : New Index
                        :                  : Pentium 90* : AMD K6/233*
    --------------------:------------------:-------------:------------
    NUMERIC SORT        :          1142.3  :      29.29  :       9.62
    STRING SORT         :          231.68  :     103.52  :      16.02
    BITFIELD            :      4.3035e+08  :      73.82  :      15.42
    FP EMULATION        :          247.92  :     118.96  :      27.45
    FOURIER             :           24853  :      28.27  :      15.88
    ASSIGNMENT          :          32.414  :     123.34  :      31.99
    IDEA                :          5665.2  :      86.65  :      25.73
    HUFFMAN             :          2436.1  :      67.55  :      21.57
    NEURAL NET          :
    CPU:NNET--error in opening file!

    Debian Lenny, 16GB RAM, on LVM (read-align 256)

    iperf

    921 Mbits/sec

    bonnie++ -u michael -s 1g -n 8

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 59378  88 66050  14 24926   4 59592  77 69149   6 719.3   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                      8 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
    darjeeling,1G,59378,88,66050,14,24926,4,59592,77,69149,6,719.3,1,8,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

    bonnie++ -u michael -s 1g -n 256

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 59848  89 65199  14 24752   4 61072  80 69264   5 727.4   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 42443  60 378919 100  1999   2 28995  40 468931 100  1370   2
    darjeeling,1G,59848,89,65199,14,24752,4,61072,80,69264,5,727.4,1,256,42443,60,378919,100,1999,2,28995,40,468931,100,1370,2

    ./nbnench

    BYTEmark* Native Mode Benchmark ver. 2 (10/95)
    Index-split by Andrew D. Balsa (11/97)
    Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
    
    TEST                : Iterations/sec.  : Old Index   : New Index
                        :                  : Pentium 90* : AMD K6/233*
    --------------------:------------------:-------------:------------
    NUMERIC SORT        :          1099.4  :      28.19  :       9.26
    STRING SORT         :          247.12  :     110.42  :      17.09
    BITFIELD            :      4.5086e+08  :      77.34  :      16.15
    FP EMULATION        :          242.64  :     116.43  :      26.87
    FOURIER             :           24699  :      28.09  :      15.78
    ASSIGNMENT          :          33.014  :     125.62  :      32.58
    IDEA                :          6714.6  :     102.70  :      30.49
    HUFFMAN             :          2174.8  :      60.31  :      19.26
    NEURAL NET          :           49.02  :      78.75  :      33.12
    LU DECOMPOSITION    :          1559.9  :      80.81  :      58.35
    ==========================ORIGINAL BYTEMARK RESULTS==========================
    INTEGER INDEX       : 80.450
    FLOATING-POINT INDEX: 56.330
    Baseline (MSDOS*)   : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0
    ==============================LINUX DATA BELOW===============================
    CPU                 : 4 CPU GenuineIntel Intel(R) Xeon(R) CPU           L5410  @ 2.33GHz 2333MHz
    L2 Cache            : 6144 KB
    OS                  : Linux 2.6.26-2-openvz-amd64
    C compiler          : gcc version 4.3.2 (Debian 4.3.2-1.1)
    libc                : libc-2.7.so
    MEMORY INDEX        : 20.798
    INTEGER INDEX       : 19.550
    FLOATING-POINT INDEX: 31.243
    Baseline (LINUX)    : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

    Debian Lenny, 512MB RAM, on LVM (read-align 8192)

    bonnie++ -u michael -s 1g -n 256

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 60006  89 65137  14 29067   5 64637  84 78755   6 697.6   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 43515  63 379181 100  2018   3 26261  38 469528 100  1234   1
    darjeeling,1G,60006,89,65137,14,29067,5,64637,84,78755,6,697.6,1,256,43515,63,379181,100,2018,3,26261,38,469528,100,1234,1

    Debian Lenny, 512MB RAM, disk direct (read-align 256)

    bonnie++ -u michael -s 1g -n 256

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 42348  63 45139   9 18894   2 42236  55 46424   4 639.7   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 38219  54 378907 100  1901   2  8710  12 470516 100  1182   1
    darjeeling,1G,42348,63,45139,9,18894,2,42236,55,46424,4,639.7,1,256,38219,54,378907,100,1901,2,8710,12,470516,100,1182,1

    Debian Lenny, 512MB RAM, disk direct (read-align 8192)

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 32064  48 45588   9 19811   3 45751  60 51435   4 647.7   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 43643  62 378565  99  1858   2  8396  11 467667  99  1124   1
    darjeeling,1G,32064,48,45588,9,19811,3,45751,60,51435,4,647.7,1,256,43643,62,378565,99,1858,2,8396,11,467667,99,1124,1

    (repeat)

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 31010  51 44288   9 20165   4 46325  62 53544   4 626.5   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 44501  62 378833 100  1837   2  8413  11 468219 100  1158   1
    darjeeling,1G,31010,51,44288,9,20165,4,46325,62,53544,4,626.5,1,256,44501,62,378833,100,1837,2,8413,11,468219,100,1158,1

    (repeat)

    Version 1.03d       ------Sequential Output------ --Sequential Input- --Random-
                        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
    Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    darjeeling       1G 31876  49 45912   9 21013   3 42870  56 42369   3 653.1   1
                        ------Sequential Create------ --------Random Create--------
                        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
                  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                    256 41862  59 377359 100  1818   2  9454  13 469059  99  1179   1
    darjeeling,1G,31876,49,45912,9,21013,3,42870,56,42369,3,653.1,1,256,41862,59,377359,100,1818,2,9454,13,469059,99,1179,1
    -->