Skip to content

Instantly share code, notes, and snippets.

@bazzilio
Created June 28, 2018 23:00
Show Gist options
  • Save bazzilio/3cbb6f4b17c67e11da583875177ad46e to your computer and use it in GitHub Desktop.
Save bazzilio/3cbb6f4b17c67e11da583875177ad46e to your computer and use it in GitHub Desktop.
Почему тупит запуск браузера
bazz@bazz ~ $ strace -c firefox 2>&1 | head -5 > file_cached_in_memory
bazz@bazz ~ $ cat file_cached_in_memory
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
54.42 0.023391 4 5357 poll
39.74 0.017079 3 5706 449 futex
5.07 0.002181 3 761 write
bazz@bazz ~ $ strace -c firefox 2>&1 | head -7 > file_cached_in_memory
bazz@bazz ~ $ cat file_cached_in_memory
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
45.24 0.028528 5 5249 416 futex
44.83 0.028267 7 3875 poll
9.55 0.006019 8 732 write
0.20 0.000124 0 918 writev
0.10 0.000063 0 6131 mprotect
bazz@bazz ~ $ sudo echo 3 | sudo tee /proc/sys/vm/drop_caches
3
bazz@bazz ~ $ strace -c firefox 2>&1 | head -7 > file_NOT_4cached_in_memory
bazz@bazz ~ $ cat file_NOT_4cached_in_memory
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
27.61 0.027307 5 5074 336 futex
22.33 0.022089 21 1061 285 open
14.30 0.014140 8 1691 51 read
12.18 0.012050 4 2915 927 stat
8.29 0.008198 2 5099 poll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment