New answers tagged

3

I dont know how to find it via ls command. But if you really want it : you can use btrfs-progs/btrfs-debug-tree. with reflink=always ,the files will share common data block. This common data block (aka extents) has refs more than 1. 1) First you need to find the objectid for the files one and two #./btrfs-debug-tree /dev/xvdc (Check under FS_TREE) ...


7

The other answers have addressed the main points. On a side note, you can increase the throughput of your while loop by writing to the output file at the end of the computation. Compare: $ i=0;time while [ $i -le 1000 ]; do ((++i)); echo "GNU" >>/tmp/f; done; real 0m0.080s user 0m0.032s sys 0m0.037s with $ i=0;time while [ $i -le 1000 ...


15

A better question would be why is your shell writing the file so slowly. Any self-contained compiled program that uses file writing syscalls responsibly (not flushing every character at a time) would do it reasonably quicky. What you are doing, is writing lines in an interpreted language (the shell), and in addition you do a lot of unnecessary input output ...



Top 50 recent answers are included