Hangar Board: the token count so far
In the previous post I wrote about building Hangar Board, the flying-group app, with Codex doing the coding. Here is the usage so far:
In the previous post I wrote about building Hangar Board, the flying-group app, with Codex doing the coding. Here is the usage so far:
I've been having some more spare time recently. Since I have been using coding agents at work for some time now, and in recent months have switched mainly to Codex, I wanted to see whether I could write a fully functional app from scratch without writing a single line of code and without looking at the code whatsoever. I own a share in an airplane. Our group uses a rather old piece of software for…
On a low-latency Linux host, it is easy to assume that nohz_full (full dynticks / adaptive ticks) means "this CPU will not get ticks." In practice, tick behavior depends on both idle policy and runqueue state. This post gives a brief summary of how this works on a Rocky Linux 9.x / 5.14.x kernel, with easy-to-reproduce examples. TL;DR nohz_full + CPU isolation does not mean zero ticks in all…
The /api/private/cli family is useful, but the “standard”/structured passthrough style (where the CLI maps onto /api/private/cli/<command-path> and parameters become fields/query params) only covers a subset of CLI commands and behaviours. When that structured approach doesn’t work (or there’s simply no corresponding REST endpoint you can use), there’s a more free-form option: POST…
The -B option in bpftrace (none / line / full) now applies not only to terminal output but also when writing to files with -o . This ensures the same predictable flushing behavior everywhere, making it easier to use tools like tail -f on trace files. Change landed in PR #4637 .
Codex CLI Setup 1. Install Codex from https://github.com/openai/codex 2. Edit the ~/.codex/config.toml file and add: preferred_auth_method="apikey" model_reasoning_effort="high" Setting the model_reasoning_effort="high" is optional but recommended. Codex IDE Setup On the machine that will access the git repositories (for example, if VS Code runs on Windows but connects to a Linux host via SSH,…
In early February 2023, I built a Slack bot to make OpenAI LLMs readily accessible within our company for experimentation. It wasn’t planned, budgeted, or part of any official initiative—just something I hacked together out of excitement for large language models. I called it HAL , after the computer in 2001: A Space Odyssey . What started as a fun experiment quickly became a core tool that many…
$ torchrun --nproc_per_node 1 test2_text_completion.py \ --tokenizer_path tokenizer.model --max_seq_len 128 --max_batch_size 4 --ckpt_dir llama-2-7b/ \ --prompt "Hello everyone, I'm LLAMA-2" ... Loaded in 4.32 seconds Hello everyone, I'm LLAMA-2 000. I'm a new member here. I'm from China. I'm a girl, I'm 16. I like animals, especially lamas. I like to play games, especially the games on the…
The latest version (0.27.8) of the pypi/openai library now supports Azure/DALLE-2 . To ensure compatibility, set openai.api_version = '2023-06-01-preview' .
Recently I've been using bpftrace to trace some events across servers and it would be really useful if bpftrace allowed to use actual unix timestamps. The nsecs variable won't work as it represents time since boot, while time() and strftime() return strings. In this specific case, an application running on server A was injecting timestamps into packets being sent to an app on server B where I run…
Although I appreciate Siri's ability to automate my home, there are times when it can be frustrating, such as when it replies with the annoying message "I found some web results, I sent them to your iPhone." Let's make Siri much more useful and fun by integrating Siri with OpenAI/ChatGPT via Shortcuts app. It even works with HomePod and Apple Watch. To get started, we need to define a variable…
Many years ago I compared performance overhead of dtrace vs. truss on Solaris, in a microbenchmark. This time I run a similar test but comparing bpftrace vs. strace on Linux. To do so, I wrote a simple C program which stawns X threads and each thread will call stat("/tmp") N times in a loop. The program then prints the total time it took for all threads to execute. While it is not necesarilly a…
Another blog entry saved as draft for a long time and waiting to be published... better late than never, so let's do it now. Over three years ago I found a bug in Linux nfs v4.0 client which results in applications temporarily not being able to open a file and getting an error. While this is due to a bug in the nfs v4.0 client code, depending on a specific nfs server you might or might not hit the…
It’s a blog entry I started writing over 3 years ago and never managed to actually finish/publish it, until now. I haven’t checked in a while if latest Linux kernel is still affected by the described behaviour here, but I suspect it is. An application running on CentOS 6.9 - it often copies files (4-6GB in size on average) from a local SSD based cache to NFSv4 (+krb) mount. Developers complained…
By default on OpenZFS/Linux the max amount of dirty data is capped at 4GB. This means that if your nas server is connected over network with faster throughput than your pool can sustain (writes), you will quickly end up being throttled when writing lots of data (>>4GB). This can easily happen if your home nas server is connected over 10GbE and its internal pool configuarion can sustain much less…
I've been playing with TrueNAS scale recently and while the BUI allows you to export/download ZFS wrapping key I wanted to know how to get the key manually. After a quick look at the code I found that the key is stored in sqlite db kept on root file system. root@truenas[~]# sqlite3 /data/freenas-v1.db SQLite version 3.34.1 2021-01-20 14:10:07 Enter ".help" for usage hints. sqlite> select * from…
How much can be gained when it comes to low latency and jitter by isolating CPUs on Linux? Let's do a microbenchmark by using a tool called hiccups . A single CPU server (overclocked). Kernel booted with the following arguments: isolcpus=nohz,domain,managed_irq,15-17 irqaffinity=0-13 nohz_full=15-17 intel_idle.max_cstate=0 idle=poll nmi_watchdog=0 nowatchdog nosoftlockup intel_pstate=passive First…
I run into an interesting problem yesterday. After changing some kernel boot parameters to enable tickless kernel, an application which is supposed to essentially "spin" 100% on a CPU was being reported as being mostly idle. This was rather puzzling. After some debugging and reading docs I've managed to reproduce the issue with a simple test case. The test is reproducible on CentOS 8.3 x86_64. $…
If you use StatsStore/Analytics on Solaris 11 you should check out the new GitHub oraclesolaris-contrib repository . For more details see Tanmay's blog post .
If you have a file system (nfs, etc.) mounted on-top of a directory and you need to see file permissions, ACLs, etc. of the underlying directory and not the mounted fs then: Solaris: # mount -F lofs -o nosub /some/path/ /mnt/fix Linux: # mount -B /some/path/ /mnt/fix If you access /mnt/fix now you won't see any mounted filesystems on top of any directories, just the underlying fs. I used it in the…
NetApp's ONTAP 9.6 introduced new REST API along with a new python module netapp_ontap . #!/bin/python import time import getpass import netapp_ontap from netapp_ontap import config from netapp_ontap.host_connection import HostConnection from netapp_ontap.resources import QuotaRule password = getpass.getpass() config.CONNECTION = HostConnection(host, user, password) start = time.time() quota_rules…
The nfsv4 provider provides some structures with component4 type which is defined as: typedef struct { uint_t utf8string_len; char *utf8string_val; } utf8string; typedef utf8string component4; So for example, to print NFSv4 file renames you have to do: nfsv4:::op-rename-start { this->a = (char *)alloca(args[2]->oldname.utf8string_len + 1); bcopy(args[2]->oldname.utf8string_val, this->a,…
Linux measures load average differently than other OS'es. In a nutshell it includes both CPU and disk i/o and more. Brendan has an excellent blog entry on this explaining in much more detail how it works.
Solaris 11.4 - setting zfs_arc_collect_check=0 via mdb (takes immediate effect) or via /etc/system makes ZFS to start feeding l2arc immediately. Notice that this can negatively impact ARC performance so use it with care. This is useful for testing if you want to push some data to into L2ARC quicker/sooner, especially on large memory systems. The variable is checked by arc_can_collect() function…
The stop() action in DTrace stops an entire process... well, actually it doesn't. It stops a single thread in a multi-threaded process, which got me surprised as I always thought it did stop an entire process. Now, this is actually very useful, though a stopall() action which would stop all threads could now be useful as well :) Update: this is getting more complicated now, the way stop() action…