It’s tempting to think about software performance in “vacuum”, disconnected
from any inputs and outputs, abstracted down to optimizing latency or
throughput. This way the problem becomes much simpler to deal with, it’s
easier to convince others of its importance – after all everyone wants to do
more with less. It’s also a quite dangerous approach, which has less and less
place in the modern world.
I believe nowadays we face a paradigm shift in how software performance is done
– it becomes more environmentally aware. People asking not only how fast this
particular piece of software can be, but also how much energy would it consume,
how expensive would that be, how will it affect thermal pollution, etc. In
other words what is the input from and output to the environment?
In this blog post I would like to discuss challenges associated with such
environmental approach to system performance from the engineering point of
view. If you ever had to deal with software optimizations, but never thought
about energy use – I hope this article would be a perfect fit for you! If you
already did consider this topic, I hope you’ll still find something
interesting. How to measure software energy footprint? Are there any caveats
about energy management and in which dimensions should we think about it? Can
we continue doing computing as we do now, if we would like to be efficient?
In these times of interdependency and extreme specialization it does not come
as a surprise that open source projects depend on each other in many ways.
Projects higher in the stack depend on features, provided by projects lower in
the stack – all while driving their development and sorting out issues
specific for this particular project. But it’s hardly breaking news that
isolation between such dependent projects might be hard to overcome, delaying
adoption of new functionality, keeping outdated decisions in place and
generally making the world less enjoyable.
In the ideal world it’s not a problem – folks from different communities are
watching closely what others are doing, understand correctly why are they doing
that and how to apply this knowledge. In reality things are a bit more messy:
we don’t always have bandwidth to follow all interesting and important
projects, and sometimes people from different communities are almost speaking
different languages.
People from HeptapoDB are trying to talk to developers from BernderOS
And that’s exactly where I’m aiming with this blog post. I’ll try to look
through recent Linux kernel changes and identify those that sound interesting
for a database like PostgreSQL. It’s a very superficial overview, and after
more close inspection it might happen I was wrong, but I still hope it can give
some impulse for future patches and discussions.
PostgreSQL community conferences, as many other industry driven events, usually
do not have proceedings or anything similar. All you get is a slide deck and,
if you’re lucky, a video recording. But it often feels not enough, as it was
with one of my talks last year at PGConfDE, where the topic I was talking about
included examples of mathematical modeling to predict how the database
will behave. Plenty of things were not said or were not communicated with
enough details, because they were simply not fitting the format.
The long story short, I’ve managed to summarize the talk as a whitepaper [1]
in much more depth and uploaded it to Zenodo, a European open research
repository operated by CERN. Let me know what you think about it.
Everyone knows benchmarking is hard (and writing about benchmarking is double
as hard), but have you ever asked “why”? What makes benchmarking, and
performance evaluation in general, so error-prone, so complicated to get right
and so easy to screw up? Those are not new questions, but there seem to be no
definitive answer, and for databases things are even more grim – yet we could
speculate, hoping that our speculation can help us learn something along the
way. I don’t think you would read anything new below, in fact many things I’m
going to talk about are rather obvious – but the process of bringing
everything together and thinking about the topic is valuable by itself.
There could be at least few reasons why it’s so easy to fail trying to
understand performance of a database system, and they usually have something to
do with the inherent duality:
It’s necessary to combine expertise from both the domain specific area and
general analytics expertise.
One have to take into account both known and unknown factors.
Establishing a comprehensive mental model of a database is surprisingly hard
and could be counter-intuitive at times.