There seems to be a little bit of confusion caused by my new year blog post, so it's probably best to clarify that right now.
I'm not going to give up maintenance of mpd related packages right now.. I've even not yet asked for adopting and I clearly have no plans on orphaning the package completely if nobody will step up.
Anyway if somebody is interested help is always welcome (though most of time you will spent on these packages is forwarding bugs upstream) and I can of course still do package uploads when he is not a Debian developer. All sources are stored in public VCS, so ready for cooperation.
Filed under: Debian English 1 comments Flattr this!
data:text/html page used as home page.
Startup vs. page cache
| Average startup time (ms) | |
|---|---|
Entirely cold cache (drop_caches) |
5887.62 0.88% |
| Cold cache after boot | 3382.0 0.51% |
| Selectively cold cache (see below) | 2911.46 0.48% |
| Hot cache (everything previously in memory) | 250.74 0.18% |
flush program from previous post and a systemtap script used to get the list of files read during startup. This script will be described in a separate post.
As you can see, profiling startup after echo 3 > /proc/sys/vm/drop_caches takes significantly more time than in the normal conditions users would experience, because of all system libraries that would normally be in the page cache being flushed, hence biasing the view one can have of the actual startup performance. Mozilla build bots were running, until recently, a ts_cold startup test that, as I understand it, had this bias (which is part of why it was stopped).
The Hot cache value is also interesting because it shows that the vast majority of cold startup time is due to hard disk I/O (and no, there is no page faults number difference).
I/O vs CPU
Interestingly, testing on a less beefy machine (Core 2 Duo 2.2GHz) with the same USB disk and kvm setup shows something not entirely intuitive:
| Average (ms) | |
|---|---|
| Entirely cold cache | 6748.42 1.01% |
| Cold cache after boot | 3973.64 0.53% |
| Selectively cold cache | 3445.7 0.43% |
| Hot cache | 570.58 0.70% |
| Average (ms) | |
|---|---|
| Entirely cold cache | 5824.1 1.13% |
| Cold cache after boot | 3441.8 0.43% |
| Selectively cold cache | 3025.72 0.29% |
| Hot cache | 576.88 0.98% |
| Average (ms) | |
|---|---|
| Entirely cold cache | 5395.94 0.83% |
| Cold cache after boot | 3087.47 0.31% |
| Selectively cold cache | 2673.64 0.21% |
| Hot cache | 258.52 0.35% |
(cold2 - hot2) - (cold1 - hot1), at a fixed CPU frequency.
Startup vs. desktop environment
We saw above that the amount of system libraries in page cache directly influences application startup times. And not all GNU/Linux systems are made equal. While the above times were obtained under a GNOME environment, some other desktop environments don t use the same base libraries, which can make Firefox require to load more of them at cold startup. The most used environment besides GNOME is KDE, and here is what cold startup looks like under KDE:
| Average startup time (ms) | |
|---|---|
| GNOME cold cache | 3382.0 0.51% |
| KDE cold cache | 4031.9 0.48% |
Once you clicked on the desired duration, the subscription is recorded and the button will appear like this:
Easy, isn t it?
PS: I installed a WordPress plugin to make it super easy to share my articles on the most common social networks.
One comment Liked this article? Click here. My blog is Flattr-enabled.
I m working on a big site, importing a lot of files to a WordPress installation and started to get a bunch of 413 s. After a little bit of googling I found out what was happening:
What needs to be done is on /etc/nginx/nginx.conf write:
http
client_max_body_size 20M;
include /etc/nginx/mime.types;
A LOT MORE SETTINGS...
Yes, just add client_max_body_size and restart your webserver. This by default is 1M, so anything beyond this will be refused.
I have finally reached a decision regarding my involvement in the Debian Ruby packaging efforts. I have decided to stop. This has been a very hard decision to make. I have invested huge amounts of time in that work over the years. I still love the language, and will continue to use it on a daily basis for my own developments. I still hope that it will succeed. I know that some people will be disappointed by that decision (and that others will think your work was useless anyway, people should use RVM and rubygems ).
But I also know that I won t be able to push for all the required changes alone. I just don t have the time, nor the motivation. For the record, here are the changes I would have liked to see in the Ruby community.
The core Ruby development community should mature.
Assigning an IP address statically to a host with a given MAC address using ISC dhcpd is quite trivial, one host entry, a hardware ethernet entry and a fixed-address entry and you are up and running.subnet 10.0.0.0 netmask 255.255.255.0
option routers 10.0.0.254;
This one configures the subnet 10.0.0.0/24, with 10.0.0.254 being the network gateway, 10.0.0.254 being the TFTP server and "fai/pxelinux.0" being the TFTP filename. Additionally pool allows us to define a range of IP addresses we want to use, along with a line stating that only members of the "install" class should get a network configuration. If you do not have any other subnet defined in your config and a client that is not in this "install" class asks for an IP address you will see something like this in your syslog: "dhcpd: DHCPDISCOVER from 11:22:33:44:55:66 via eth1: network 10.0.0/24: no free leases". dhcpd will not even answer these requests and thus the client will not even know that there is a DHCP server running here. Exactly what we wanted.option broadcast-address 10.0.0.255;filename "fai/pxelinux.0";next-server 10.0.0.254;server-name "10.0.0.254";poolallow members of "install";range 10.0.0.10 10.0.0.230;
class "install" match hardware;Again, not very hard to do. This tells dhcpd to look for subclasses of "install" with a matching hardware-address. So let's have a look at the subclass for, let's say the host with MAC address "11:22:33:44:55:66":
subclass "install" 1:11:22:33:44:55:66;I intentionally highlighted the leading "1:" there. This means nothing more or less than "ethernet". Without that leading "1:" you won't get anywhere. Matching will fail, simple as that. It took me a while to find information about this in "man 5 dhcp-eval". Quoting parts of the interesting section:
Now, with the combination of the subnet, pool, class and subclass directives we could get the setup we wanted: a DHCP server only providing IP configuration to a specific set of hosts and ignoring all other DHCP requests.The hardware operator returns a data string whose first element isthe type of network interface indicated in packet being considered,and whose subsequent elements are client s link-layer address. [...] Hardware types include ethernet (1), token-ring (6), and fddi (8).
It's new year (for almost 18 hours here) and it's time to balance a bit what has happened in year 2010.
I'm not going to expose details from my personal life and anything related to work, so all what remains are open source projects where I am active.
For phpMyAdmin it was year of quite big changes, most of them beeing agreed on Fosdem 2010. We have migrated to git from svn, what was great step forward and I really like the change. It was also decided to use gettext (or rather php-gettext) for translations in upcoming release. I can see this move (together with online translation service) has definitely attracted more contributors (hey, but there are still many languages not translated, you're welcome!). Also we've participated in Google Summer of Code 2010, what lead to several big projects being merged into our code base (see my summary for more details). All in all, we're heading to 3.4 release in first months of 2011, which will be quite major step and hopefully heading in right direction.
In Gammu and Wammu, there were lot of code improvements, most of them probably going into Gammu SMS Daemon (the latest one being unified SQL backend removing lot of code duplication). Another major improvement is The Gammu Manual covering everything from Gammu command line, through SMSD up to python and C API. On the other side I've bought me a Symbian based phone, which does not work with Gammu and I use Series60-Remote for that, so my interest in Gammu has declined a bit.
Even though I've started adopting some packages in Debian, so it looked like I will end up with much more than last year, but at the end I've decided I'm too overloaded with some of them (and don't use them anymore), so I've given some for adoption and got rid of nanoblogger (and nanoblogger-extra) and looking for somebody to pick up gpointing-device-settings. Maybe all mpd related packages will follow soon, because I currently do not use mpd, so it limits quite a bit my ability to test them.
And of course: Happy New Year 2011!
Filed under: Debian Gammu Phpmyadmin English 0 comments Flattr this!
It would be really neat if there were some tool which recorded which dotfiles an application read, used, or created.
As an example emacs uses .emacs, but won't create it. However firefox will create and fill ~/.mozilla if it isn't present, and links will create ~/.links2.
What would we do with that data? I'm not sure off the top of my head, but I think it is interesting to collect regardless. Perhaps a simple tool such as apt-file to download the data and let you search:
who-creates ~/.covers who-creates ~/.diaObviously the simple use is to purge user-data when matching packages are removed - e.g. dpkg-posttrigger hook. But that's a potentially dangerous thing to do. Anyway I'm just pondering - I expect that over time applications will start switching to using "centralised" settings such as ~/.gconf2 etc. In the menatime I've started cleaning up ~/ on my own machines - things like ~/.spectemurc, ~/.grip, etc. ObQuote: What a long sword. I like that in a man - Blood of the Samurai (Don't be tempted; awful film.)
One week ago, I sent the updated announcement below to the r-sig-finance list; this was kindly blogged about by fellow committee member Josh and by our pal Dave @ REvo. By now. I also updated the R / Finance conference website. So to round things off, a quick post here is in order as well. It may even get a few of the esteemed reader to make a New Year's resolution about submitting a paper :) Dear R / Finance community, The preparations for R/Finance 2011 are progressing, and due to favourable responses from the different sponsors we contacted, we are now able to offer
Gib Bassett, Peter Carl, Dirk Eddelbuettel, Brian Peterson,
Dale Rosenthal, Jeffrey Ryan, Joshua Ulrich
Last night was the last time I came back from a pub with my clothes
stinking due to tobacco smoke. The Spanish congress has finally approved a
real anti-smoking law which will ban smoking on public areas, with no
exceptions or ways to workaround the ban. Starting on January 2nd, the
Spanish state will be a smoke-free region (or mostly, it seems it'll be
permitted in open-air events like football stadiums or bullrings, and I
don't think that will be a great problem for me, specially the latter).
For years, my intolerance to smoke has been increasing and I'm really
expectant to see the benefits of this law in my habits. After more than 30
years dealing with smoke around us, it's our turn now. I've been speaking
to a few barmans. In general they seem worried this will affect their
business, but I can't see how it will. Spain has a big culture for having
mid-morning almuerzos in bars, and people are not going to give
that up due to not being able to smoke. They will just do it after they
get out, not during the coffee, and that's it. The barmans of the two bars
I visit most are non-smokers, but have to breath the smoke of hundreds of
cigarretes every day, and can't do anything about it. Until tomorrow, when
this will end and everyone will have a right to breath better air. I hope
this kind of legislation continues to be adopted throughout Europe, because
the FOSDEM welcome party is probably the next smoke horror I'll have to face
soonish. :)
The bug webinterface of the
Ultimate Debian Database
currently knows about the following release critical bugs:
| In Total: | 608 |
|---|---|
| Affecting Squeeze: | 115 |
| Squeeze only: | 37 |
| Remaining to be fixed in Squeeze: | 78 |
| Pending in Squeeze: | 3 |
|---|---|
| Patched in Squeeze: | 19 |
| Duplicates in Squeeze: | 12 |
| Can be fixed in a security Update: | 3 |
| Contrib or non-free in Squeeze: | 4 |
| Claimed in Squeeze: | 0 |
| Delayed in Squeeze: | 3 |
| Otherwise fixed in Squeeze: | 11 |
Squeezereleased. However, with the view of the Release Managers, 85 need to be dealt with for the release to happen. Please see
Interpreting the release critical bug statisticsfor an explanation of the different numbers.
Benchmark results before:
num_operations: 1000000
insert : 191.090 s ( 5238.3/s) CPU; 191.106 s ( 5237.7/s) wall clock
lookup : 30.430 s ( 33068.8/s) CPU; 30.428 s ( 33064.0/s) wall clock
lookup_range: 85.700 s ( 11694.5/s) CPU; 85.700 s ( 11693.6/s) wall clock
insert2 : 143.320 s ( 6986.7/s) CPU; 143.315 s ( 6986.6/s) wall clock
remove : 246.010 s ( 4068.0/s) CPU; 246.013 s ( 4067.9/s) wall clock
remove_range: 225.210 s ( 4444.0/s) CPU; 225.286 s ( 4442.4/s) wall clock
That's insert, lookup, and remove operations (and range operations)
on a B-tree with one million keys. insert2 is insertions where keys are
sorted. All nodes are stored in memory, not on disk.
After some micro-optimization (replacing my own flexible bsearch
implementation with the Python standard library one):
num_operations: 1000000
insert : 97.850 s ( 10237.5/s) CPU; 97.860 s ( 10237.1/s) wall clock
lookup : 12.430 s ( 81566.1/s) CPU; 12.429 s ( 81609.8/s) wall clock
lookup_range: 52.670 s ( 19047.6/s) CPU; 52.669 s ( 19050.0/s) wall clock
insert2 : 72.600 s ( 13806.4/s) CPU; 72.595 s ( 13808.6/s) wall clock
remove : 134.510 s ( 7443.8/s) CPU; 134.512 s ( 7444.0/s) wall clock
remove_range: 169.740 s ( 5897.3/s) CPU; 169.795 s ( 5895.6/s) wall clock
Not bad, for a train ride's work, with some additional improvements late
at night in a hotel room.
Code is clearer too, now, at least mostly. And there's less of it:
duplicating standard library functionality always maks me feel icky.
The numbers for removals look bad, really bad. Espcially range removal
should be much better. If anyone wanted to get familiar with my btree
code base, that would be an excellent place to start from. See the
README for instructions.
It's after Christmas, and the stores are full of Android tablets ranging in quality from mediocre to competent. Obviously, they're also ranging in terms of GPL compliance from "utter failure" to "pretty good". I've written a summary page here so you have:
(This is part of a series of posts on Why Linux?)
I find Linux more flexible. Maybe that's the familiarity showing, maybe
it's about the package management, but it's a powerful reason for me to
use it.
For example, a couple of years ago I wanted to try out some iSCSI stuff
against a SAN. Of course I have test boxes available I can do this on,
but this was just to try out a few bits and pieces rather than anything
more concrete. So I installed open-iscsi on my desktop and was able to merrily do the tests I wanted with very little additional work.
Or I wanted to try out some BitKeeper to git conversion work recently. I
wasn't sure how much resource it would take on a build server, and
didn't want to tie things up there. So I ran it on my desktop overnight,
where I could easily setup the appropriate environment and wouldn't
impact on anyone else's resources.
Problems talking to dodgy hardware? Linux is much better about giving
you some idea what's going on, without needing to install extra
software. I had a workmate grappling with an old USB music player
recently; hooking it up to her Windows laptop wasn't providing a lot of
joy so I attached it to my Linux box and was able to see that it did
identify ok, but was disconnecting randomly at times too.
Want to script querying an AD server for the current employee list and
displaying who's joined and who's left since the last time you did so?
I found that easy enough with the common Linux LDAP tools. I'm sure it's
doable under Windows too, but I'm not sure it would be quite so simple.
For bonus points add graphviz into the mix for automatic organisation
charts (modulo accuracy of the AD data).
This flexibility is something that helps me do my job. Sure, as I
mentioned above I do have access to test boxes that I can use for
this, but being able to do it on my desktop can be useful - for example
if I'm offline, or on a slow network connection, or just geographically
distant from my test machines so network latency is higher than I'd
like.
(Also, it's something that makes a Linux box a really great test box.
I'm lucky in that I have a mix of OSes available to me for testing, but
the one that I use most often is the Debian box. Much easier to get and
install decent diagnosis tools for it that can give me packet level
dumps, or do really odd stuff that turns out to be really useful.)
After several months of leisurely development
(I've read through everything on the Internet several times,
and notified everyone who was wrong),
I have finally gotten obnam, my backup application,
into a state where it successfully backs up my laptop's hard disk
to a USB disk.
I therefore declare it to be perfe... no, wait, I don't.
It's slow. It's probably buggy in ways that will make you want to
abandon computers forever. It's also slow. And buggy. Did
I mention it is slow, making backups at only a few megabytes per
second?
Disclaimers aside, I am happy to have gotten obnam to this stage.
It's not nearly ready, but it's getting along nicely.
If you've been curious about obnam ever since I first mentioned it
in 2007, now might be a good time to try it out. I would be very
interested in hearing any feedback.
Obnam is implemented using copy-on-write B-trees, and I've
also released my B-tree implementation.
See the NEWS file in each source tree for information for what's
changed since the previous release.
Links:
I have made Debian packages of obnam, btree, and some of my other
stuff that they need, for all, amd64, and i386 architectures.
The repository is at http://code.liw.fi/debian/,
so add this to your sources.list if you want to use that:
deb http://code.liw.fi/debian squeeze main
Note, however, that I do not guarantee that this repository will be
in any useful state at any given time. I use it, and rely on it, and
will fix things when they bother me, but that's all the guarantee I
give. (Do you get the impression I've read too many contracts?)
Once obnam is ready, and Debian squeeze is released, I'll upload
it to Debian, and then you'll get it for any architecture Debian
runs one. If anyone wants to help me maintain the packages for
Debian, please e-mail me.
If, on the other hand, you'd like to help make obnam faster, or
better, the bug tracker has some pointers. Right now speed is
perhaps the biggest problem. The B-tree library needs optimizing,
as does obnam itself. And the LRU cache I use.
The worst missing feature is encryption support.
I do my backups to a local hard disk, which is full-disk encrypted,
which is why I haven't cared about implementing encryption yet.
Also, I need to design a good way to manage keys, etc. Help with
that would be quite welcome.
Next.