Hayden James
haydenjames.io · Personal blog · on HN since 2014
Blog by Hayden James on Linux server administration, performance monitoring, web hosting, and Raspberry Pi tinkering.
What HN saysHN links it for practical Linux tips, including its post on removing snap from Ubuntu and the debate over always adding swap space.
29HN people shared it
13linked it in comments
431stories submitted
2.8Kstory points
3 years agolast shared
2014people per year2026
Most-shared posts
- 1Almost Always Add Swap Space6 people · 136 points · first shared 2017 · 109 comments on HN
- 2Use atop for Linux server performance analysis, here’s how and why4 people · 31 points · first shared 2016 · discussion on HN
- 3Useful List of Server Monitoring and APM Solutions4 people · 20 points · first shared 2014 · discussion on HN
- 4Best Linux Distro and DE or WM Combinations4 people · 15 points · first shared 2015 · 1 comments on HN
- 580% of the Web Powered by PHP (2017)3 people · 199 points · first shared 2017 · 129 comments on HN
- 6Raspberry Pi 3 Overclock and Turbo Config (2016)3 people · 46 points · first shared 2016 · 14 comments on HN
- 7Don't go live without one or more of these APM tools3 people · 32 points · first shared 2016 · 1 comments on HN
- 8Your Web Host Doesn’t Want You to Read This: Easy VPS Benchmarking3 people · 25 points · first shared 2015 · 1 comments on HN
- 9Almost Always Add Swap. Part 2: ZRAM (Linux)3 people · 14 points · first shared 2020 · discussion on HN
- 10Remove Snap Ubuntu 22.04 LTS3 people · 3 points · first shared 2022 · discussion on HN
- 11Home lab beginners guide (2021)2 people · 479 points · first shared 2020 · 180 comments on HN
- 12The Two Generals Problem2 people · 96 points · first shared 2022 · 50 comments on HN
- 13Finding Linux Compatible Printers2 people · 66 points · first shared 2014 · 47 comments on HN
- 14Choosing a Linux Distro for Your PC in 20182 people · 65 points · first shared 2017 · 5 comments on HN
- 15Freq Used Linux Commands2 people · 46 points · first shared 2020 · 1 comments on HN
What HN people wrote when they linked it
sarchertech · 2023-08-22
I wrote a guest blog post on the 2 generals problem that goes into a bit about sagas, which this paper touches on briefly in the compensation section.
One of these days I’m going to write a follow up blog post called “You (probably) don’t need sagas.” About how at my current company I was able to remove almost all of the sagas we were using because it turns out they were never needed in the first place.
https://haydenjames.io/the-two-generals-problem/
noasaservice · 2022-10-20
Because this matters: https://haydenjames.io/remove-snap-ubuntu-22-04-lts/
I've been getting "Firefox is updating in $time days" as a unstoppable notification, because snap uses highest priority to jam notifications through.
The best is to purge snap completely from the system. And the URL applies to 22.04, but likely also works mostly the same, with possibly more "snap list" crap to remove.
If I could properly administrate snap, and if it followed my settings, I'd use it. But it doesn't provide for ANY sort of reasonable administration nor respectable defaults. So it gets the axe.
nacs · 2022-09-04
Snap-Firefox is noticeably slower on startup for me as well. After upgrading to the latest Ubuntu where snap-Firefox is default, I completely uninstalled snap and all packages then installed from a PPA.
Everything is better and smoother now.
Ubuntu is great but snap continues to be the worst part about using it.
Edit: Instructions for removing snap completely and switching to non-snap Firefox as well (not my site):
https://haydenjames.io/remove-snap-ubuntu-22-04-lts/
gknoy · 2020-05-24
I don't have one, but was considering buying one. I went looking for benchmarks a while back, and it seemed that it performed about as well as a several-year-old cheap laptop, from some guy's blog that I can't find right now. :-(
However, most reviews I've read have said that it generally performs better than you'd expect for its price, e.g Hayden James' review [0]. He later updated to say:
"""Two months later, I can report that although my Pinebook Pro still sees some usage, for the most part I’ve reverted to my old laptop. It’s a very capable laptop for the price and I still strongly recommend ownership! The lack of CPU and graphics performance was the eventual deal beaker for me. At times loading email messages in Gmail would take ages."""
After reading this, I still feel like it might be a decent chromebook alternative for the kids.
0: https://haydenjames.io/pinebook-pro-my-first-impressions-and-setup-tip…
AnotherGoodName · 2023-10-09
malloc will take away from the disk cache.
Fwiw without swap there isn't really any paging in or out (yes mmapped files technically still can but they are basically a special cased type of swap) so your question is hard to parse in this context. The disk cache is all about using unallocated memory and an allocation will reduce it. Paging is irrelevant here.
Btw you should always enable swap. Without it you force all unused but allocated memory to live on physical RAM. Why would you want to do this? There's absolutely no benchmarks that show better performance with no swap. In fact it's almost always the opposite. Add some swap. Enjoy the performance boost!
https://haydenjames.io/linux-performance-almost-always-add-swap-space/
5e92cb50239222b · 2023-06-12
It is useful, unless you have an absolute crapton of memory, several times what you actually need. The swap is trivial to encrypt if you're paranoid (the key doesn't need to be persisted and can be generated from /dev/urandom on each boot).
https://chrisdown.name/2019/07/18/linux-memory-management-at-scale.htm…
https://haydenjames.io/linux-performance-almost-always-add-swap-space/
https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption
dschuetz · 2022-10-15
Swap or no swap: https://haydenjames.io/linux-performance-almost-always-add-swap-space/
It's the use cases that make a difference.
1_player · 2021-12-02
Don't forget Part 2: https://haydenjames.io/linux-performance-almost-always-add-swap-part2-…
zram is cool, and I've noticed Fedora uses it out of the box. Much better than regular swap space on a disk.
https://wiki.archlinux.org/title/Improving_performance#zram_or_zswap
Interestingly, my 64GB desktop has 50GB available between free and caches, yet has 95MB of swap space used (out of 8GB zram). How can I tell which process is swapped out? Probably something which I haven't ever needed since I've booted the PC.
henryfjordan · 2020-06-10
The link about "full details" is probably what you're looking for: https://haydenjames.io/home-lab-beginners-guide-hardware/
ashitlerferad · 2020-01-07
andrewdalpino · 2019-05-27
What languages do you program in?
I've used PHP for a while now. PHP is a language that favors practicality. It's a language that is depended on throughout the world and doesn't (purposely) change as fast to accommodate new trends
Having that said
- The value of machine learning has become very clear over the past decade or so
- 80% of websites on the web are powered by PHP
https://haydenjames.io/80-percent-web-powered-by-php/
I undoubtedly anticipate a steady rise in effort from the PHP community directed at practical applications of ML - Rubix ML being one of the first libraries to make these tools accessible to the PHP engineer
colecut · 2018-11-26
There is also this to consider
https://haydenjames.io/80-percent-web-powered-by-php/
ozy23378 · 2016-07-13
Going to perform some very basic DD i/o benchmarks using:
https://haydenjames.io/web-host-doesnt-want-read-benchmark-vps/
Will post results.