n0derunner

    Back to basics – gprof PT1 (generating a profile)

    Published: (Updated: ) in Linux, , , , by . Leave a Comment on Back to basics – gprof PT1 (generating a profile).

    A while ago at work we were discussing the pros and cons of the classic Linux profiler gprof… What are profiles useful for? The output of a profile run against a very simple program looks like the example below. It tells us that of the 5.82 seconds of profiled runtime It also tells us that […]

    Effect of POSIX_FADV_SEQUENTIAL and POSIX_FADV_RANDOM on IO performance.

    Published: (Updated: ) in Storage Performance, , , , , by . Leave a Comment on Effect of POSIX_FADV_SEQUENTIAL and POSIX_FADV_RANDOM on IO performance..

    Previously we looked at how the POSIX_FADVISE_DONTNEED hint influences the Linux page cache when doing IO via a filesystem. Here we take a look at two more filesystem hints POSIX_FADV_RANDOM and POSIX_FADV_SEQUENTIAL

    Using fio to read from Linux buffer-cache

    Published: (Updated: ) in Storage Performance, fio, , , by . Leave a Comment on Using fio to read from Linux buffer-cache.

    Sometimes we want to read from the Linux cache rather than the underlying device using fio. There are couple of gotchas that might trip you up. Thankfully fio provides the required work-arounds. TL;DR To get this to work as expected (reads are serviced from buffer cache) – the best way is to use the option […]

    Understanding QEMU devices

    Published: (Updated: ) in Linux Virtualization, , , by . Leave a Comment on Understanding QEMU devices.

    Not sure where I came across this, but it is an excellent description of QEMU (and virtualization in general).  I am very much a fan of this style of technical communication as exemplified in this final summary paragraph (the full article is longer): In summary, even though QEMU was first written as a way of […]

    A Nutanix / Prometheus exporter in bash

    Published: (Updated: ) in Nutanix, SQL Server, , , , , by . Leave a Comment on A Nutanix / Prometheus exporter in bash.

    Overview For a fun afternoon project, how about a retro prometheus exporter using Apache/nginx, cgi-bin and bash!? About prometheus format A Prometheus exporter simply has to return a page with metric names and metric values in a particular format like below. When you configure prometheus via prometheus.yml you’re telling prometheus to visit a particular IP:Port […]

    Linux memory monitoring (allocations Vs usage)

    Published: (Updated: ) in Linux, , , , , by . Leave a Comment on Linux memory monitoring (allocations Vs usage).

    How to use some of Linux’s standard tools and how different types of memory usage shows up. Examples of using malloc and writing to memory with three use-cases for a simple process In each case we run the example with a 64MB allocation so that we can see the usage from standard linux tools. We […]

    Using iperf multi-stream may not work as expected

    Published: (Updated: ) in Linux, , , , by . 2 Comments on Using iperf multi-stream may not work as expected.

    Running iperf with parallel threads TL;DR – When running iperf with parallel threads/workers the -P option must be specified after the -c <target-IP> option. This is mentioned in the manpage but some options (-t for instance) work in any order, while others (specifically the -P for parallel threads) definitely does not, which is a bit […]

    How to monitor SQLServer on Windows with Prometheus

    Published: (Updated: ) in Telemetry, Database Performance, , , by . Leave a Comment on How to monitor SQLServer on Windows with Prometheus.

    TL;DR

    Generate load on Microsoft SQLserver Windows from HammerDB on Linux

    Published: (Updated: ) in Database Performance, , , , , by . Leave a Comment on Generate load on Microsoft SQLserver Windows from HammerDB on Linux.

    Often it’s nice to be able to drive Windows applications and databases from Linux, especially if you are more comfortable in a Unix environment. This post will show you how to drive a Microsoft SQL Server database running on a Windows server from a remote Linux machine. In this example I am using Ubuntu 22.04, […]

    Create a Linux VM with KVM in 6 easy steps

    Published: (Updated: ) in Linux Virtualization, , , , , by . 5 Comments on Create a Linux VM with KVM in 6 easy steps.

    A Step-by-step guide to creating a Linux virtual machine on a Linux host with KVM,qemu,libvirt and ubuntu cloud images.

    Using cloud-init with AHV command line

    Published: (Updated: ) in AHV, , by . Leave a Comment on Using cloud-init with AHV command line.

    TL;DR Using cloud-init with AHV is conceptually identical to using KVM/QEMU- we need to use a few different tools with AHV You will need a Linux image that is configured to use cloud-init. A good source is cloud-images.ubuntu.com We will create a cloud-init textual file and create a mountable version using the cloud-localds tool on […]

    Why does my SSD not issue 1MB IO’s?

    Published: (Updated: ) in Storage Performance, , , , , by . Leave a Comment on Why does my SSD not issue 1MB IO’s?.

    First things First Why do we tend to use 1MB IO sizes for throughput benchmarking? To achieve the maximum throughput on a storage device, we will usually use a large IO size to maximize the amount of data is transferred per IO request. The idea is to make the ratio of data-transfers to IO requests […]

    Duplicate IP issues with Linux and virtual machine cloning.

    Published: (Updated: ) in Linux Virtualization, , by .

    TL;DR – Some modern Linux distributions use a newer method of identification which, when combined with DHCP can result in duplicate IP addresses when cloning VMs, even when the VMs have unique MAC addresses. To resolve, do the following ( remove file, run the systemd-machine-id-setup command, reboot): # rm /etc/machine-id # systemd-machine-id-setup # reboot When […]

    Performance gains for postgres on Linux with hugepages

    Published: (Updated: ) in Postgres, , , , by .

    For this experiment I am using Postgres v11 on Linux 3.10 kernel. The goal was to see what gains can be made from using hugepages. I use the “built in” benchmark pgbench to run a simple set of queries. Since I am interested in only the gains from hugepages I chose to use the “-S” […]

    The return of misaligned IO

    Published: (Updated: ) in Storage Performance, , , by .

    We have started seeing misaligned partitions on Linux guests runnning certain HDFS distributions.  How these partitions became mis-aligned is a bit of a mystery, because the only way I know how to do this on Linux is to create a partition using old DOS format like this (using -c=dos  and -u=cylinders)