Just learnt that DTrace can’t be run at full pelt when rootless Mac OS X feature is enabled. For example, iotop ends like this:
: probe description io:::start does not match any probes
And it seems that the only way out is to boot into a rescue mode and run csrutil disable to turn off the protection mode. Only after that you could call your best friends like iotop, iosnoop and many others which are published at DTrace Book page.
Btw, if you haven’t bought it yet I highly recommend to do so.
Not a long ago I had one of those humiliating moments when a simple question makes you numb a or even worse – you begin to mumble an absolute rubbish. That what exactly what has happened to me recently and being an afterthought person (which, of course, doesn’t give me any advantage) I decided to do some homework/recap o the questions I’ve failed misarebly.
- Linux PIPE
– Read “man 2 pipe” as it basically says it all in a single sentene:
pipe() creates a pair of file descriptors, pointing to a pipe inode, and places them in the array pointed to by filedes. filedes is for reading, filedes is for writing.
– Want to go deeper then the source code is the best place to start:
- Linux VM overcommit
– Again, start from reading the documentation.
– Take a look at the code to figure out how the heuristic overcommit handling works. Especially, __vm_enough_memory() which is run by security_vm_enough_memory_mm(), which in turn could be called from different places, e.g. mmap_region(), acct_stack_growth(), do_brk(), insert_vm_struct(), dup_mmap().
– “man 3 malloc”, “man 2 mallopt”
– Go through do_brk() code.
– Read vm sysctl documentation about the swappiness parameter.
– swappiness comes into play in get_scan_count() which is called from shrink_lruvec().
– If the code looks murky, take a look at the answer published at unix.stackexchange.com which goes in a greater details about vm.swappiness.
– Read about Split LRU
And of course, buy, read and re-read Understanding the Linux Kernel even if it’s a bit dated.