Same here, obviously.
The container was started using: docker run -it --rm -v /tmp:/tmp ubuntu bash
.
Here’s the output of a sample dd:
$ pwd
/tmp
$ time dd if=/dev/zero of=test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB, 98 MiB) copied, 30.7729 s, 3.3 MB/s
real 0m30.791s
user 0m0.160s
sys 0m1.150s
Meanwhile, on the host I was caputring system calls with dtruss: sudo dtruss -c -d -e -f -o -p 25329 2> /tmp/dtruss.log
25329/0x150c7a: 16678 143 20 write(0x6, "\r\0", 0x1) = 1 0
25329/0x150c7b: 11956 163 12 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 11974 191 13 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 11999 44 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12005 36 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12013 44 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12026 49 8 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12036 47 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12046 43 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12053 42 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12061 45 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12071 41 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12079 36 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12087 44 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12096 36 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12104 42 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12113 41 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12121 49 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12129 46 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12139 173 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12145 47 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12153 38 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12165 39 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12170 32 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12178 43 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12187 73 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12199 118 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c80: 2080 1945 16 kevent(0x5, 0x0, 0x0) = 1 0
25329/0x150c80: 2102 13 6 read(0x6, "\r\n\0", 0x1000) = 2 0
25329/0x150c80: 2128 21 16 write(0x1, "\r\n\0", 0x2) = 2 0
25329/0x150c80: 2137 5 1 read(0x6, "\0", 0x1000) = -1 Err#35
25329/0x150c80: 2145 6 1 kevent(0x5, 0x0, 0x0) = 0 0
25329/0x150c7b: 12207 181 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12220 61 11 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12230 41 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12247 50 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12254 38 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12262 40 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12268 39 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12274 35 3 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12281 37 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12287 37 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12294 39 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12299 34 3 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12304 37 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12310 38 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12317 38 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12322 36 3 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12330 38 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12337 40 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12344 38 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12352 44 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12360 41 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12368 39 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12375 35 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12384 41 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12392 63 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12400 129 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12407 195 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12416 416 6 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12423 806 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12431 1614 5 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12438 2621 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12448 6437 8 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c7b: 12459 35 2 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c80: 2158 30790240 7 kevent(0x5, 0x0, 0x0) = 1 0
25329/0x150c80: 2184 96 9 read(0x6, "100000+0 records in\r\n100000+0 records out\r\n102400000 bytes (102 MB, 98 MiB) copied, 30.7729 s, 3.3 MB/s\r\n\0", 0x1000) = 105 0
25329/0x150c80: 2209 20 15 write(0x1, "100000+0 records in\r\n100000+0 records out\r\n102400000 bytes (102 MB, 98 MiB) copied, 30.7729 s, 3.3 MB/s\r\n\0", 0x69) = 105 0
25329/0x150c80: 2217 5 1 read(0x6, "\0", 0x1000) = -1 Err#35
25329/0x150c80: 2223 5 1 kevent(0x5, 0x0, 0x0) = 0 0
25329/0x150c7b: 12477 55 7 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
25329/0x150c80: 2234 1188 7 kevent(0x5, 0x0, 0x0) = 1 0
25329/0x150c80: 2253 9 4 read(0x6, "\r\nreal\t0m30.791s\r\nuser\t0m0.160s\r\nsys\t0m1.150s\r\n\033]0;root@93aefffad6f2: /tmp\aroot@93aefffad6f2:/tmp# \033[K\0", 0x1000) = 102 0
25329/0x150c80: 2289 109 14 write(0x1, "\r\nreal\t0m30.791s\r\nuser\t0m0.160s\r\nsys\t0m1.150s\r\n\033]0;root@93aefffad6f2: /tmp\aroot@93aefffad6f2:/tmp# \033[K\0", 0x66) = 102 0
25329/0x150c80: 2309 90 8 read(0x6, "\0", 0x1000) = -1 Err#35
25329/0x150c80: 2323 9 5 kevent(0x5, 0x0, 0x0) = 0 0
25329/0x150c7b: 12494 38 4 select(0x0, 0x0, 0x0, 0x0, 0x700000080DE8) = 0 0
CALL COUNT
write 4
kevent 7
read 7
select 61
As you can see, there’s really one blocking steps if I understand this correctly. At the moment, I am unable to dig deeper, but I’ll see if I can find a way.