fork() and exec() work well as separate system calls
for the common situation where the child (but not the
parent) needs to adjust something before executing
the new program. Changing file descriptors to implement
> and < in the shell, for example. It's common to see
sequences like
this is a test. I think you have already honed in on the basics: "You have to actually do it". If it seems like there are too many things to try and they all look appealing, you just need to understand yourself better and self observation will help you there.
You are wrong to suggest that we grow to like anything life forces us to do. If you have an analytical mind, a job flipping burgers or pressing buttons as a tester is never going to satisfy you. You might be able to change the job to something you like more (e.g. write test scripts) but that's a whole other topic.
Some additional things I have learnt that may be useful for you are: (1) There is no one thing predestined to be your calling in life, there are several things you may like. (2) If you really want something, you'll usually get it eventually or find something that you like better.
It is useful to set a long term goal based on what you know you like so far and at least initially, while you are still in college, it is useful to state it broadly but don't tie yourself to a specific way of getting to that goal.
For example, I know I enjoy coding, technology, business and teaching. There are several combinations of these that could end up being my calling. The specific image I may have in mind is to work as an engineer / technical entrepreneur now and become a I think you have already honed in on the basics: "You have to actually do it". If it seems like there are too many things to try and they all look appealing, you just need to understand yourself better and self observation will help you there.
You are wrong to suggest that we grow to like anything life forces us to do. If you have an analytical mind, a job flipping burgers or pressing buttons as a tester is never going to satisfy you. You might be able to change the job to something you like more (e.g. write test scripts) but that's a whole other topic.
Some additional things I have learnt that may be useful for you are: (1) There is no one thing predestined to be your calling in life, there are several things you may like. (2) If you really want something, you'll usually get it eventually or find something that you like better.
It is useful to set a long term goal based on what you know you like so far and at least initially, while you are still in college, it is useful to state it broadly but don't tie yourself to a specific way of getting to that goal.
NEW END.
I ran the test with 1,000,000 INSERTs (taking 200 seconds),
with the innodb cache size set to only 200,000 bytes.
So there's a fair chance it updated the b-trees on disk.
167 small transactions per second on MySQL 4.1 / InnoDB / FreeBSD / FFS / SCSI, which looks like one per rotation.
Presumably the time required to write a block at the
end of the write-ahead log.
5000 per second with --innodb_flush_log_at_trx_commit=0, which only writes the log to disk once per second.
The MySQL documentation claims that this configuration does crash-recovery correctly, though you may lose the last second's worth of transactions.
On MySQL 4.1 / InnoDB / FreeBSD / FFS / SCSI, small inserts run at about 167 transactions per second, i.e. one per rotation.
Same setup but --innodb_flush_log_at_trx_commit=0,
a million transactions in 200 seconds, or 5000/second.
I don't know if InnoDB wrote its B-Tree to disk during the 200 seconds. Same performance even with InnoDB's buffer pool size set to 200 KB with --innodb_buffer_pool_size=200000.
The MySQL documentation claims that this configuration
does crash-recovery correctly, though you may lose
the last second's worth of transactions.
The drives whose documentation I've
read say they may not copy the write-cache to the surface
during a power failure. I don't know about other drives, or
about why.
Such a feature would anyway be hard or impossible to use as
part of a design to get fast writes and crash recovery.
Crash recovery usually depends on constraints on the
order writes were applied to the disk surface -- for
example that all the log blocks were on the surface
before any of the B-Tree blocks. Or (for FFS) that an
i-node initialization goes to the surface before the
new directory entry during a creat(). Drives that just
provide write caching don't guarantee any ordering
(much of the point of write-caching is to change
the order of writes), and don't tell the o/s
which writes have actually completed. So the
write-order invariants that crash recovery depends on
won't hold with write-caching. That's why tagged command
queuing is popular in high-end systems: TCQ lets the
drive re-order concurrent writes, but tells the o/s when
each completes, so for example a DB can wait for the
log writes to reach the surface before starting the
B-Tree writes.
In our case, perhaps a pure log-structured DB could use
a disk write-cache. Crash recovery could scan the whole
disk (or some guess about the tail of the log) looking
for records that were written, and use the largest
complete prefix of the log. But we would not be able to
use the disk for anything with a more traditional crash
recovery design -- for example we probably could not
store our log in a file system! Perhaps we could tell the
disk to write-cache our data, but not the file system's
meta-data. On the other hand perhaps we'd want to write
the log to the raw disk anyway, since we don't want to be
slowed down by the file system adding block numbers to
the i-node whenever we append the log.
New server: one Xeon E5-2690 chip, 2.9 GHz, 8 cores total, 32 GB RAM.