HNHacker News
TopNewBestAskShowJobs

sprachspiel

557 karma · joined May 4, 2008

submissionscomments
sprachspiel··on SSDs have become fast, except in the cloud
Just tested a i4i.32xlarge:

  $ lsblk
  NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
  loop0          7:0    0  24.9M  1 loop /snap/amazon-ssm-agent/7628
  loop1          7:1    0  55.7M  1 loop /snap/core18/2812
  loop2          7:2    0  63.5M  1 loop /snap/core20/2015
  loop3          7:3    0 111.9M  1 loop /snap/lxd/24322
  loop4          7:4    0  40.9M  1 loop /snap/snapd/20290
  nvme0n1      259:0    0     8G  0 disk 
  ├─nvme0n1p1  259:1    0   7.9G  0 part /
  ├─nvme0n1p14 259:2    0     4M  0 part 
  └─nvme0n1p15 259:3    0   106M  0 part /boot/efi
  nvme2n1      259:4    0   3.4T  0 disk 
  nvme4n1      259:5    0   3.4T  0 disk 
  nvme1n1      259:6    0   3.4T  0 disk 
  nvme5n1      259:7    0   3.4T  0 disk 
  nvme7n1      259:8    0   3.4T  0 disk 
  nvme6n1      259:9    0   3.4T  0 disk 
  nvme3n1      259:10   0   3.4T  0 disk 
  nvme8n1      259:11   0   3.4T  0 disk
Since nvme0n1 is the EBS boot volume, we have 8 SSDs. And here's the read bandwidth for one of them:

  $ sudo fio --name=bla --filename=/dev/nvme2n1 --rw=read --iodepth=128 --ioengine=libaio --direct=1 --blocksize=16m
  bla: (g=0): rw=read, bs=(R) 16.0MiB-16.0MiB, (W) 16.0MiB-16.0MiB, (T) 16.0MiB-16.0MiB, ioengine=libaio, iodepth=128
  fio-3.28
  Starting 1 process
  ^Cbs: 1 (f=1): [R(1)][0.5%][r=2704MiB/s][r=169 IOPS][eta 20m:17s]
So we should have a total bandwidth of 2.7*8=21 GB/s. Not that great for 2024.
sprachspiel··on SSDs have become fast, except in the cloud
This is for 8 SSDs and a single modern PCIe 5.0 has better specs than this.
sprachspiel··on Are you sure you want to use MMAP in your database management system? [pdf]
These settings control writing back modified pages. The experiments in the paper are read-only. With writes the situation is even worse than shown in the paper (though tuning these settings may help a bit).
sprachspiel··on Are you sure you want to use MMAP in your database management system? [pdf]
This would be exactly the kind of innovation we would need in computer science. Instead we often get stuck in local minima (in this case a 40-year old POSIX interface) without realizing how much pain this causes.
sprachspiel··on ARM and Lock-Free Programming
Even after watching these videos and reading lots of articles on the topic, I still find the full C++ memory model extremely hard to understand. However, on x86 there are actually only a couple of things that one needs to understand to write correct lock free code. This is laid out in a blog post: https://databasearchitects.blogspot.com/2020/10/c-concurrenc...
sprachspiel··on Unix: A History and a Memoir, by Brian Kernighan
Everyone interested in the history of computing should read The Dream Machine by M. Mitchell Waldrop. The book pretends to be the biography by a little-known, but highly-influential guy named Licklider, but is in fact maybe the best general history of computing. It covers Turing, von Neumann, ARPA, Multics, DARPA (the internet), and Xerox PARC. Alan Key recommends it as the best history of PARC.
sprachspiel··on Intel Xeon E5 v3: Up to 18 Haswell EP Cores
Well, the biggest Ivy Bridge EX has 15 cores! There's speculation that the 18 core Haswell-EPs are actually Haswell-EX dies that Intel wants to get rid as fast as possible because these chips have buggy TSX (transactional memory).
sprachspiel··on A Call for a Low-Carb Diet
fruit
sprachspiel··on Crit-bit trees
But cold caches are an unrealistic assumption. The top-most levels of a tree will always be in cache, unless you almost never access them -- in which case there's no problem either. Additionally, a radix tree is ordered, whereas a hash table is not.
sprachspiel··on IPv4 is depleted: Final five blocks allocated to registries
I wonder how long it will take until there is a market for IP addresses. I suspect once such a market is in place IPv6 will not see widespread adoption, since most IPv4 addresses are not really used.
sprachspiel··on Egyptian Revolution Live [video]
What has happened so far: A curfew was put in place, it has done absolutely nothing, the streets are full of people everywhere in the country. There are reports of dozens of deaths. The headquarter of president Mubaraks party is on fire for hours, no firefighter are there. The headquarter is next the most important Egyptian museums. The police has no control over the streets, the army was ordered in to enforce the curfew. The people are actually cheering as the military is moving in. It is still unclear what the military will do. Hillary Clinton has issued a statement to the Egyptian government to restrain security forces and avoid violence.
sprachspiel··on The Economist's Books of the Year
The Big Short: Inside the Doomsday Machine is a very good book on the crisis. The Economist calls it "One of the best books on the recent crisis". I very much agree with this assessment. It's written by the former investment banker Michael Lewis who is the author of Liar's Poker and Moneyball.
sprachspiel··on Monty Hall problem
Another similar problem from http://www.inference.phy.cam.ac.uk/mackay/itila/

You visit a family whose three children are all at the local school. You don't know anything about the sexes of the children. While walking clumsily round the home, you stumble through one of the three unlabeled bedroom doors that you know belong, one each, to the three children, and find that the bedroom contains girlie stuff in sufficient quantities to convince you that the child who lives in that bedroom is a girl. Later, you sneak a look at a letter addressed to the parents, which reads `From the Headmaster: we are sending this letter to all parents who have male children at the school to inform them about the following boyish matters'.

These two sources of evidence establish that at least one of the three children is a girl, and that at least one of the children is a boy. What are the probabilities that there are (a) two girls and one boy; (b) two boys and one girl?

sprachspiel··on Monty Hall problem
This is actually an interesting variation of the problem. If a random door opens but by chance happens to not have the prize, then the result is different.
sprachspiel··on What is Computer Science?
Even in England it used to be commonly called Informatics. I like Informatics/Informatik/Informatique etc. much better than "Computer Science", because most applications are not really about computing, but about information.
sprachspiel··on Beautiful Code
Three sad programmer stories and a happy ending:

In order to handle complexity, I split my program carefully into modules with low coupling. I'm happy until a new feature comes along which cannot be implemented without destroying the independence of the existing modules. Then there are two options: Either I redesign the system based on the new requirements or hack the new feature into the old architecture. Both alternatives make me sad.

I recognize some repetitive pattern in my code. So I create some straightforward abstraction that removes the redundancy. I'm happy until the pattern appears again, but this time in some slightly different form so that the old abstraction can't handle it. Then I change the abstraction to include the new case. Eventually, I realize that the abstraction has only complicated the system, because now one has to understand both the implementation of the abstraction and the use of it. This make me sad.

I'm working on some easy task. I know that I have solved problems like this many times before. Unfortunately this time my brain just refuses to solve the problem. Without solving the problem, I go home and think about pursuing a different career.

On the next morning I solve the problem within 5 minutes and I'm glad to be a programmer.

sprachspiel··on An end to frivolous patents may finally be in sight
The transcript of the relevant Supreme Court hearing is the reason for hope and is remarkable thoughtful: http://www.supremecourtus.gov/oral_arguments/argument_transc...
sprachspiel··on Singular Value Decomposition Tutorial
Unless X has 17,770*480,189 elements like the netflix dataset. Then you can use something like this: http://sifter.org/~simon/journal/20061211.html

The site is currently down, google chache link: http://209.85.129.132/search?q=cache:h4Ljyun3gUcJ:sifter.org...

sprachspiel··on Why Poor Countries Are Poor
Interesting. In Russian and Polish this kind of phrase is quite common. In German it's not common, and I would consider it bad style. How about English?
sprachspiel··on Why Poor Countries Are Poor
What does "eight times poorer" mean?
sprachspiel··on SQL Databases Don't Scale
I think scalability and reliability are mostly orthogonal issues and should be discussed separately.

Scalability is a farce. In my experience applications are implemented in such hilariously inefficient ways, because it's hard to see where the time and especially the IO is spent. But adding more machines is not a good solution, because it becomes even more difficult to understand the performance behavior of the system. Also, it transforms the system into a distributed system and therefore adds a whole new level of complexity and failure causes. Most websites don't have the some problems as Google and Amazon.

Optimizing the application could prevent the need for scaling out to multiple machines. Optimization is not rocket science: Find out the bottleneck and fix it. Often it is random IO, so either load the data into RAM or change the algorithm to use sequential IO (e.g. through batch computation).

Reliability means that the system must work correctly all the time and there is no way to fix it (e.g. a satellite on a mission). Thus, for most applications availability, which is the fraction of time a system works, is a more appropriate metric.

There are two basic strategies for achieving high availability in a system: perfection and fault-tolerance. Perfection is the default programming model, which assumes that every hardware and software component of the system works as expected. Fault-tolerant systems, on the other hand, are hard and require that the system is designed around this idea. Also, fault-tolerance makes it harder to change the system. An often overlooked fact is that for many systems it is actually much easier to achieve a particular availability goal through perfection rather than trying to build a more complex fault-tolerant system.

sprachspiel··on How to find per-process I/O statistics on Linux
Anyone has an idea if there is any way to distinguish random from sequential IO?

In my experience sequential IO is never the problem. Instead, it seems to me that random seeks are really the only performance problem nowadays. In the most extreme case throughput is only ~100Bits/s instead of ~100MB/s. Unfortunately random seeks are hidden behind abstraction layers and thus quite invisible to programmers (until the system freezes). Maybe we just need to wait for SSDs to become cheap.

sprachspiel··on Erik Naggum (1965-2009) RIP
http://en.wikiquote.org/wiki/Erik_Naggum
sprachspiel··on Don't get too excited about some recent brighter economic news
Remarkable facts about The Economist:

- It is a British newspaper published in London, although only 13% of its copies are sold in the United Kingdom. 57% are sold in North America, 17% in Continental Europe, and 10% in Asia.

- It doesn't actually focus on the economy that much. Most content is political.

- It is liberal in the classical sense. That is, it favors both personal and economical freedom.

- Articles don't mention the name of the author.

sprachspiel··on Why You Should Know C++
My reason not to learn C++: There are so many things one should know, that it is not rational to learn all the arcane details of C++. Every decision to learn something is an implicit decision not learn everything else.
sprachspiel··on Ten easy ways to attract women to your free software project
This article doesn't mention the actual reason: There are very few female geeks. And geeks are those who create open source software. Women who go into computing do it in order to earn money.
sprachspiel··on Doing Personal Computer Software Development in the early 80s
That guy compares British rule in India around 1800 with Jewish rule in the US now. He dismisses the arguments of global warming, based on the claim that small differences can't cause big ones.
sprachspiel··on Denmark 1970: 99% energy from the Middle East. 2000: 0%. 100% energy independent.
If you are interested in the topic, check out the book "Sustainable Energy - Without the Hot Air" (available at http://www.withouthotair.com/ ). Unfortunately it's pretty disillusioning.