Skip to content

Instantly share code, notes, and snippets.

View Gelbpunkt's full-sized avatar
Weeeeeeeeee

Jens Reidel Gelbpunkt

Weeeeeeeeee
View GitHub Profile
@Gelbpunkt
Gelbpunkt / cupid-filesystems.md
Created June 1, 2023 23:55
cupid filesystem benchmarks

Filesystem benchmarks

I've added a file /vendor/random.data with 4GB of random data from /dev/urandom. We are comparing block sizes 2K, 4K, 8K and 16K for ext4 and erofs.

For erofs, we are also using BOARD_EROFS_PCLUSTER_SIZE := 262144 according to the Google documentation. We will compare lz4hc, lz4 and disabling compression.

I did mount /vendor -o remount,cache_strategy=disabled for erofs to make sure nothing gets cached. The 5.10 kernel on cupid does not seem to support dax=always or the legacy dax flags, neither does it support deduplicating blocks. That may result in more accurate and/or better results, but the numbers difference is huge as is.

Also, ext4 has quite stable read numbers, while erofs with compression fluctuates by ~5-10% on subsequent runs.

@Gelbpunkt
Gelbpunkt / aioshell.py
Created December 6, 2018 20:33
Example for asyncio shell commands
import asyncio
from asyncio.subprocess import PIPE, STDOUT
class Result:
def __init__(self, status, stdout, stderr):
self.status = status
self._stdout = stdout or ""
self._stderr = stderr or ""
if stdout is not None:
@Gelbpunkt
Gelbpunkt / aiopg-discordbot.py
Last active April 30, 2018 17:39
Discord Bot aiopg example
import aiopg
#attach the pool to the bot
async def create_pool():
connstring = 'dbname=databasename user=databaseuser password=databasepassword host=databasehost'
pool = await aiopg.create_pool(connstring)
return pool
async def start_bot():
pool = await create_pool()