Skip to content

Instantly share code, notes, and snippets.

View pklaus's full-sized avatar

Philipp Klaus pklaus

  • Frankfurt, Germany
View GitHub Profile
@pklaus
pklaus / pg_test_fsync
Created March 12, 2020 15:24
Postgres Filesystem Benchmark of an Intel Optane 900P 480GB PCIe SSD mounted in a PCIe 4.0 x8 slot (linked directly to CPU, not to chipset)
$ uname -a
Linux owl 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
@pklaus
pklaus / pg_test_fsync
Last active March 12, 2020 15:23
Postgres Filesystem Benchmark of a Corsair MP600 500GB NVMe SSD mounted in a PCIe 2.0 x1 slot (while it would support PCIe 4.0 x4)
$ uname -a
Linux owl 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
@pklaus
pklaus / pg_test_fsync
Created March 12, 2020 15:18
Postgres Filesystem Benchmark of a Corsair MP600 2TB NVMe SSD mounted in a PCIe 4.0 x8 slot
$ uname -a
Linux owl 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
@pklaus
pklaus / numba-diffusion.py
Last active February 5, 2020 09:42 — forked from quasiben/numba-diffusion.py
Diffusion with Sink using Python and Numba
import numpy as np
from numba.decorators import jit
from numba import *
import time
mu = 0.1
Lx, Ly = 601, 601
@jit('void(double[:,:], double[:,:], int32)')
def diffusionObstacleStep(u, tempU, iterNum):
@pklaus
pklaus / pg_test_fsync
Created January 7, 2020 13:48
Postgres / PostgreSQL Benchmarks with pg_test_fsync on a 4-drive Raid 5 of WDC WD2002FYPS-0 2TB SATA HDDs (Intel i7-4770K and Intel Z87 Chipset)
$ uname -a
Linux owl 5.4.8-arch1-1 #1 SMP PREEMPT Sat, 04 Jan 2020 23:46:18 +0000 x86_64 GNU/Linux
$ cat /etc/issue
Arch Linux \r (\l)
$ pg_config --version
PostgreSQL 12.1
$ cd ~
$ pg_test_fsync
5 seconds per test
@pklaus
pklaus / pg_test_fsync
Created January 7, 2020 13:41
Postgres / PostgreSQL Benchmarks with pg_test_fsync on a WDC WD2002FYPS-0 2TB SATA HDD (AMD Ryzen 3600X on X570 Chipset)
$ uname -a
Linux owl 5.4.8-arch1-1 #1 SMP PREEMPT Sat, 04 Jan 2020 23:46:18 +0000 x86_64 GNU/Linux
$ cat /etc/issue
Arch Linux \r (\l)
$ pg_config --version
PostgreSQL 12.1
$ cd ~
$ pg_test_fsync
5 seconds per test
@pklaus
pklaus / pg_test_fsync
Created January 7, 2020 13:35
Postgres / PostgreSQL Benchmarks with pg_test_fsync on a Samsung 970 Evo Plus 2TB PCIe M.2 2280 SSD (AMD Ryzen 3600X on X570 Chipset)
$ uname -a
Linux owl 5.4.8-arch1-1 #1 SMP PREEMPT Sat, 04 Jan 2020 23:46:18 +0000 x86_64 GNU/Linux
$ cat /etc/issue
Arch Linux \r (\l)
$ pg_config --version
PostgreSQL 12.1
$ cd ~
$ pg_test_fsync
5 seconds per test
@pklaus
pklaus / Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case.md
Last active July 23, 2019 09:55
Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case

Issues with Mac Mini 2018 running Linux from M.2 SSD in a IB-1817M-C31 USB-C Case

As the internal SSD is hidden behind the encryption done by the T2 chip, the Linux system has to be on some external storage. For now, I'm using my M.2 SSD on a Raidsonic Icy Box IB-1817M-C31 USB-C case equipped with a JMicron USB to PCIE Bridge (JMS583 chipset). Its connection resets sometimes (~ 3x per hour resulting in system stall of ~1 min – annoying).

Offtopic:

Later I want to use a i-tec MySafe Thunderbolt 3 M.2 NVMe (PN: TB3MYSAFEM2). I ordered it almost two months ago but they seem to have difficulties producing it in reasonable amounts. Hope I get my hands on it soon and the issue in this gist might disappear!

Issues with Mac Mini 2018 running Linux Resulting in Broken Fan Control

The Linux kernel module applesmc fails to load on a Mac Mini 2018. The attached log is a try to load it via modprobe on Kernel 5.2.2-arch1-1-ARCH.

@pklaus
pklaus / Hardware of Mac Mini 2018 as seen by Linux.md
Last active July 23, 2019 10:04
Hardware of Mac Mini 2018 as seen by Linux

Hardware of Mac Mini 2018 as seen by Linux

The operating system used is Arch Linux w/ Kernel 5.2.2-arch1-1-ARCH.

Issues:

  • Fan control isn't working (s the system gets hot) as the applesmc module doesn't load, see this gist.
  • As the internal SSD is hidden behind the encryption done by the T2 chip, the Linux system has to be on some external storage. For now, I'm using my M.2 SSD on a IB-1817M-C31 USB-C Case. This connection resets sometimes (~ 3x per hour resulting in system stall of ~1 min). See this gist