R
Rusty Russell
rusty.ozlabs.org · Personal blog · on HN since 2010
Rusty Russell, a Linux kernel developer, writes about C library design, filesystem layout, and Bitcoin block size.
What HN saysHN commenters link his posts on designing reusable C libraries, his response to the /usr merge as FHS editor, and Bitcoin block limits.
24HN people shared it
15linked it in comments
17stories submitted
563story points
9 months agolast shared
2010people per year2026
Most-shared posts
- 1The Bitcoin Blocksize: A Summary4 people · 93 points · first shared 2015 · 90 comments on HN
- 2If you didn’t run code written by assholes, your machine wouldn’t boot3 people · 160 points · first shared 2011 · 47 comments on HN
- 3Why Everyone Must Oppose The Merging of /usr and /3 people · 16 points · first shared 2012 · 1 comments on HN
- 4On C Library Implementation3 people · 1 points · first shared 2010 · discussion on HN
- 5On C Linked Lists (Profiling and Optimizing)2 people · 60 points · first shared 2010 · 31 comments on HN
- 6Is a memory buffer all zero bytes (in C)?2 people · 1 points · first shared 2018 · discussion on HN
- 7Homepage2 people · first shared 2013
- 8GCC and C vs C++ Speed, Measured1 people · 103 points · first shared 2013 · 70 comments on HN
- 9Bitcoin Lightning Networks Part I: Revocable Transactions1 people · 56 points · first shared 2015 · 7 comments on HN
- 10The Bitcoin Megatransaction: 25 Seconds to Verify1 people · 40 points · first shared 2015 · discussion on HN
- 11Superfreakonomics: Superplug for Intellectual Ventures1 people · 23 points · first shared 2010 · 4 comments on HN
- 12Quick Stats on Zstandard (zstd) Performance – Rusty Russell's Coding Blog1 people · 3 points · first shared 2017 · discussion on HN
- 13Sources of Randomness for Userspace1 people · 2 points · first shared 2012 · discussion on HN
- 14Legal Questions About LocalBitcoins.com and Australia1 people · 2 points · first shared 2014 · discussion on HN
- 15What Bitcoin Transactions Get Crowded Out If Blocks Fill?1 people · 1 points · first shared 2015 · discussion on HN
What HN people wrote when they linked it
cpeterso · 2011-02-24
Linux developer Rusty Russell wrote a helpful article about designing C libraries to be easily configured and reused:
"On C Library Implementation":
http://rusty.ozlabs.org/?p=140
For such an important subject, there is little practical discussion or good examples of library design. Compare the number of books about C++ object-oriented design versus the design and packaging of C/C++ libraries.
The best reference I know is John Lakos's excellent (but ancient: 1996!) book on the subject: "Large-Scale C++ Design." Here are some excerpts from the book.
http://blog.codeimproved.net/2009/03/the-large-scale-c-software-design…
http://www.cs.unc.edu/~stotts/COMP204/lakos/
notalaser · 2016-11-22
Rusty Russell summarized this nicely a few years ago: http://rusty.ozlabs.org/?p=236 (careful, sarcasm follows).
The merge does involve some loss of flexibility (for instance, "traditionally", you could use the programs in /bin to recover a failing system), but there are fewer and fewer users relying on it. It also involves departing from the FHS, but Debian already does that (e.g. they use /lib/<GNU triplet> rather than /lib{32,64}). I haven't heard any super convincing arguments from either side; normally, I'd go by the "not broken -- nothing to fix" route, but it's also hard to poke holes in the "this additional complexity isn't needed anymore" line of reasoning. Plus, like most arguments that involve tradition, it's pretty hard to tell robustness from cruft.
Whether this change can be done cleanly and without breaking users' systems is an entirely different story and past experience has shown that moderation is a far better friend than optimism. It's particularly difficult to migrate existing installation to this scheme (e.g. Arch failed quite badly, as I remember from those particular two afternoons, thanks a lot Arch!, and it didn't go more smoothly for others, either), but Debian can benefit from the lessons learned by more up-to-da^H^H^H^H fast-moving distributions and do things better.
RustyRussell · 2022-09-08
(2013)
Though I responded in 2012, so it may be older (the log on the site says 2013 though).
FWIW, my response, as FHS editor:
https://rusty.ozlabs.org/?p=236
andrewla · 2017-08-17
Out of curiosity, can you point me to the prior research that you mention? Aside from a couple of blogs, notably [1], I haven't seen much formal research, much less anything showing bounds on supportability.
[1] https://rusty.ozlabs.org
mikeokner · 2016-04-19
Basically, the current block size limit of 1MB isn't sufficient for the current volume of transactions. Some transactions aren't making it into blocks in real-time and have to sit waiting in a queue to be processed. This leads to delays in processing commercial payments, which in turn threatens Bitcoin's viability as a mainstream currency.
Some people argue the issue could be easily fixed by simply raising the block size limit, but others disagree and believe that would become too costly in bandwidth and processing capacity for miners, so AFAIK there's still no consensus on a resolution.
A couple other good explanations:
http://rusty.ozlabs.org/?p=535
https://medium.com/@octskyward/the-resolution-of-the-bitcoin-experimen…
amboar · 2013-10-26
Probably this guy, because he curates ccan: http://rusty.ozlabs.org
benatkin · 2012-11-09
Since it's under the AGPL it will mostly be built by people that have been vetted. By switching to this people are one step closer to having a machine that boots without assholes. http://rusty.ozlabs.org/?p=196
julian37 · 2012-03-07
Two articles benchmarking Judy arrays compared to hash tables:
http://rusty.ozlabs.org/?p=153
http://www.nothings.org/computer/judy/
forgotusername · 2011-06-28
Rusty Russell had a slightly tongue-in-cheek rant about such things recently, http://rusty.ozlabs.org/?p=140
There's a bunch more recent articles on his blog covering similar topics
bartl · 2011-05-19
Perhaps you didn't read all of it?
Anyway, the person mentioned in this subthread did reply in a comment on the original post. (http://rusty.ozlabs.org/?p=196#comment-721)
wmf · 2011-03-26
http://feedblog.org/2008/10/12/google-bigtable-compression-zippy-and-b…
There's also an interesting discussion at: http://rusty.ozlabs.org/?p=81 You can get better compression by organizing your data such that similar data falls within the compression window, or if you can't reorganize data you can build a custom compressor that specifically looks at older versions of a page for matches (I guess that's like git).
williamcotton · 2015-07-15
On the contrary, the network worked as expected. A somewhat costly stress test resulting in a backlog of transactions that were prioritized by fee, just as predicted.
The backlog has since been drastically reduced and high priority fees are back in the 50,000 satoshi per kb range [0]... the average Bitcoin transaction is about 250 bytes, so 12,000 satoshi per transaction, or roughly 3 cents. Low priority transactions of < 1 cent are still somewhat easily confirmed [1].
Even during the stress test I saw high priority fees hovering around the 85,000 satoshi/byte range, and never in the 1,000,000+ satoshi/byte range that you're talking about.
What's impressive is that the price [2] of Bitcoin was completely unaffected by a bit of weather [3] on the network and in fact gained in value during the entire ordeal.
Public data storage like the ledger maintained by the Bitcoin blockchain has a definite cost and it makes sense that prices would rise as demand increased. The blockchain is a scarce resource. It might make sense for transactions fees to end up around the price of a postage stamp at some point. It's hard to predict how this economic system will continue to evolve.
What's most important is that the ledger continues to be maintained, eventually consistent, secured by lots of hashing power, 100% verifiable and has an open and equal access to read and write as it ever did.
Not every transaction between two parties needs to be recorded on the blockchain. The blockchain is…
ksk · 2013-05-22
Citing kernel code is not a good argument without actually understanding why they're using linked lists, when they are used and how many of them are used at a time, etc, etc. Most of those linked lists are not really relevant. Because (1) they are far too few of them (2) they do not occur in areas where performance is significantly impacted. Besides which.. the kernel is a single instance program. Its not like there are 1,000 different kernels running simultaneously.
So.. if you want to write a web server/service that can serve tens of thousands of requests - Write it both ways and see for yourself. Its obvious that linked lists are a performance drag. Although they have much in common with other forced indirection penalties (virtual functions, etc)
Edit: ah, found a nice post that has analyzed just this.
http://rusty.ozlabs.org/?p=168
Look at the performance profile here. Using linked lists is the right choice because of the way they are used...
rwmj · 2026-02-11
The OP should try with -march=native so the compiler can use vector instructions.
Slightly off-topic but I like this way to test if memory is all zeroes: https://rusty.ozlabs.org/2015/10/20/ccanmems-memeqzero-iteration.html (see "epiphany #2" at the bottom of the page) I really wish there was a standard libc function for it.
Taek · 2015-08-16
Let's balance the discussion out a bit:
Greg Maxwell's thoughts (small blocks): http://sourceforge.net/p/bitcoin/mailman/message/34090559/
About internet bandwidth growth (~neutral): http://rusty.ozlabs.org/?p=493
An attempt at a well-rounded overview (~neutral): http://rusty.ozlabs.org/?p=535
some thoughts by bittorrent creator Bram Cohen (small blocks): https://medium.com/@bramcohen/bitcoin-s-ironic-crisis-32226a85e39f
Some thoughts by gavin andresen (large blocks): http://gavinandresen.ninja/