Skip to content

Instantly share code, notes, and snippets.

View i8degrees's full-sized avatar

Jeffrey Carpenter i8degrees

View GitHub Profile
@i8degrees
i8degrees / ssd_optimizations.md
Created August 25, 2025 19:15
u.2 nvme usage
created modified
2024-12-27 15:52:21 -0600
2025-04-21 07:23:34 -0500

ssd_optimizations


created: 2023-01-15T00:00:00-05:00 modified: 2023-01-15T00:00:00-05:00

@i8degrees
i8degrees / PM1377.md
Created August 24, 2025 18:00
smart diag
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-5.15.178-2-MANJARO] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       AEGL15T4P5xnNTRI
Serial Number:                      S5V3NA0T800880
Firmware Version:                   3P01
PCI Vendor ID:                      0x144d
PCI Vendor Subsystem ID:            0x1590
@i8degrees
i8degrees / app.cpp
Created July 21, 2025 06:11
wxWidgets Singleton Example
/*
* Copyright (C) 2023 - 2024 Vadym Hrynchyshyn <[email protected]>
*/
#include "app.h"
#include "utils.h"
#include "wusbip.h"
#include <libusbip/src/file_ver.h>
#!/bin/bash
#
# AUTHORS
# 1. Michael ****
# 2. Jeffrey Carpenter <[email protected]>
#
# CHANGELOG
# - [x] FIXME(JEFF): Fix the URL encodings in live_trackers_list_urls array
# - [x] TODO(JEFF): Add shell debug env; `DEBUG=1` and/or `DEBUG_TRACE=1` for
# feature activation
#!/bin/sh
# to use:
# write me to /usr/local/bin/dnsmasq-nsupdate.sh
# chmod +x /usr/local/bin/dnsmasq-nsupdate.sh
# append to /etc/dnsmasq.conf:
# dhcp-script=/usr/local/bin/dnsmasq-nsupdate.sh
# in /etc/init.d/dnsmasq, find the blob of lines that begin "procd_add_jail_mount" and add:
# procd_add_jail_mount /usr/local/bin/dnsmasq-nsupdate.sh /usr/bin/logger /usr/bin/nsupdate /lib /usr/lib /etc/dnsmasq-nsupdate
# restart dnsmasq
@i8degrees
i8degrees / games.md
Created April 30, 2025 19:50
My games "TODO"
  • FortNite

  • Final Fantasy Brav

  • F.E.A.R.

  • Uncharted

  • Farcry

  • Perfect Dark

  • Legend of Dragoon

  • Shadowrun

  • Secret of Evermore

@i8degrees
i8degrees / virgil_from.rss
Created April 27, 2025 05:02
youtube rss feed
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:yt="http://www.youtube.com/xml/schemas/2015" xmlns:media="http://search.yahoo.com/mrss/" xmlns="http://www.w3.org/2005/Atom">
<link rel="self" href="http://www.youtube.com/feeds/videos.xml?playlist_id=PLDGx-1nzm08f8RJ-eD0iGfNWZDGubRIqt"/>
<id>yt:playlist:PLDGx-1nzm08f8RJ-eD0iGfNWZDGubRIqt</id>
<yt:playlistId>PLDGx-1nzm08f8RJ-eD0iGfNWZDGubRIqt</yt:playlistId>
<yt:channelId>UCU0EAOCPqUgEGdpixEVDRHQ</yt:channelId>
<title>virgil_from</title>
<author>
<name>Jeffrey Carpenter</name>
<uri>https://www.youtube.com/channel/UCU0EAOCPqUgEGdpixEVDRHQ</uri>
@i8degrees
i8degrees / movies.md
Created April 26, 2025 05:18
movies export from my notes
@i8degrees
i8degrees / NVMe_tweaks.md
Created April 21, 2025 23:10 — forked from v-fox/NVMe_tweaks.md
Linux kernel optimizations for NVMe

By default Linux distros are unoptimized in terms of I/O latency. So, here are some tips to improve that.

Most apps still don't do multi-threaded I/O access, so it's a thread-per-app which makes per-app speed always bottlenecked by single-core CPU performance (that's not even accounting for stuttering on contention between multiple processes), so even with NVMe capable of 3-6 GB/s of linear read you may get only 1-2 GB/s with ideal settings and 50-150/100-400 MB/s of un/buffered random read (what apps actually use in real life) is the best you can hope for.

All writes are heavily buffered on 3 layers (OS' RAM cache, device's RAM cache, device's SLC-like on-NAND cache), so it's difficult to get real or stable numbers but writes are largelly irrelevant for system's responsiveness, so they may be sacrificed for better random reads.

The performance can be checked by:

  • `fio --name=read --readonly --rw={read/randread} --ioengine=libaio --iodepth={jobs_per_each_worker's_command} --bs={4k/2M} --direct={0/1} --num
@i8degrees
i8degrees / nvme-vf
Created April 21, 2025 12:21 — forked from roolebo/nvme-vf
#!/bin/bash
# SPDX-License-Identifier: MIT
# Copyright (C) 2024 Roman Bolshakov.
# All rights reserved.
#
# The script was tested on Samsung PM173x with FW EPK9CB5Q and EPK9GB5Q.
#
# It's recommended to use at least VQ=3 VI=3 with PM173x for decent
# single-threaded I/O performance.
#