MORE SYSTEM CALL TRACING We see a lot of this sort of loop, of /proc//smaps being repeatedly opened, read, closed, and reopened. Doesn't seem very efficient. stat("/proc/20004/smaps", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open("/proc/20004/smaps", O_RDONLY|O_CLOEXEC) = 11 fcntl(11, F_GETFD) = 0x1 (flags FD_CLOEXEC) fstat(11, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 ioctl(11, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fffc0a4a930) = -1 ENOTTY (Inappropriate ioctl for device) read(11, "7f6409fbb000-7f6409fc6000 r-xp 0"..., 8192) = 3717 read(11, "7f640a3de000-7f640a3df000 rw-p 0"..., 8192) = 3686 read(11, "7f640a5f6000-7f640a7f5000 ---p 0"..., 8192) = 3890 read(11, "7f640a9fa000-7f640aa00000 r-xp 0"..., 8192) = 3561 read(11, "7f640ae01000-7f640ae02000 r--p 0"..., 8192) = 4015 read(11, "7f640b00b000-7f640b20a000 ---p 0"..., 8192) = 3681 read(11, "7f640b41d000-7f640b41e000 rw-p 0"..., 8192) = 3576 read(11, "7f640b631000-7f640b830000 ---p 0"..., 8192) = 3747 read(11, "7f640ba7a000-7f640ba7b000 rw-p 0"..., 8192) = 3695 read(11, "7f640beb0000-7f640beb1000 r--p 0"..., 8192) = 3763 read(11, "7f640c0f2000-7f640c2f1000 ---p 0"..., 8192) = 3759 read(11, "7f640c50d000-7f640c521000 r-xp 0"..., 8192) = 3760 read(11, "7f640c953000-7f640c954000 rw-p 0"..., 8192) = 3692 read(11, "7f640cc78000-7f640ce77000 ---p 0"..., 8192) = 3694 read(11, "7f640d086000-7f640d087000 rw-p 0"..., 8192) = 3754 read(11, "7f640d5bd000-7f640d5c3000 r--p 0"..., 8192) = 3704 read(11, "7f640d802000-7f640d803000 rw-p 0"..., 8192) = 3695 read(11, "7f6415f91000-7f6415faa000 r-xp 0"..., 8192) = 3606 read(11, "7f64163d1000-7f64163d2000 r--p 0"..., 8192) = 4072 read(11, "7f6416895000-7f641689a000 rw-p 0"..., 8192) = 4074 read(11, "ffffffffff600000-ffffffffff60100"..., 8192) = 492 read(11, "", 8192) = 0 close(11) = 0 stat("/proc/20004/smaps", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 open("/proc/20004/smaps", O_RDONLY|O_CLOEXEC) = 11 fcntl(11, F_GETFD) = 0x1 (flags FD_CLOEXEC) fstat(11, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 ioctl(11, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fffc0a4a930) = -1 ENOTTY (Inappropriate ioctl for device) read(11, "7f6409fbb000-7f6409fc6000 r-xp 0"..., 8192) = 3717 read(11, "7f640a3de000-7f640a3df000 rw-p 0"..., 8192) = 3686 read(11, "7f640a5f6000-7f640a7f5000 ---p 0"..., 8192) = 3890 read(11, "7f640a9fa000-7f640aa00000 r-xp 0"..., 8192) = 3561 read(11, "7f640ae01000-7f640ae02000 r--p 0"..., 8192) = 4015 read(11, "7f640b00b000-7f640b20a000 ---p 0"..., 8192) = 3681 read(11, "7f640b41d000-7f640b41e000 rw-p 0"..., 8192) = 3576 HERE IS A SOCKET BEING OPENED, getting file descriptor 11, and then select() being called on it. I think this is the select() that's taking a lot of time in the call graph: socket(PF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_TCP) = 11 fcntl(11, F_GETFD) = 0x1 (flags FD_CLOEXEC) fstat(11, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 fstat(11, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 connect(11, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("192.168.50.8")}, 16) = 0 fstat(11, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 fstat(11, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0 getsockname(11, {sa_family=AF_INET, sin_port=htons(58415), sin_addr=inet_addr("192.168.50.8")}, [16]) = 0 setsockopt(11, SOL_TCP, TCP_NODELAY, [1], 4) = 0 write(11, "HEAD /ldp/items/7ac561ae574928a1"..., 134) = 134 fcntl(11, F_GETFL) = 0x2 (flags O_RDWR) fcntl(11, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(11, 0x7f6434d52cc0, 16384) = -1 EAGAIN (Resource temporarily unavailable) select(12, [11], NULL, NULL, {60, 0}) = 1 (in [11], left {59, 990628}) Note that file descriptor 11 seems to get assigned a lot. The smaps file is opened, gets this descriptor, is closed; and then a socket is opened and gets that descriptor, so that accounts for both being 11. You have to pay attention to what was open()ed prior to the read() or select().