Last active
January 7, 2025 02:26
-
-
Save math314/814ae9021e2a01a40d9cc1f6fc2411bc to your computer and use it in GitHub Desktop.
isucon memo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slow queryで追いきれない場合、performance_schema.events_statements_summary_by_digestを利用するのが良い | |
performance_schemaの情報は | |
* 再起動 | |
* `CALL sys.ps_truncate_all_tables(FALSE);` | |
で更新される | |
https://github.com/takonomura/isucon14/blob/master/scripts/sql-performance.sh | |
https://dev.mysql.com/doc/refman/8.0/en/performance-schema-wait-summary-tables.html | |
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-timing.html | |
つまり、 SUM_TIMER_WAIT がクエリ合計実行時間 | |
nginx | |
connectionが問題になることがあるので、最初のうちにやっておくと良いかも | |
``` | |
worker_rlimit_nofile 100000; | |
events { | |
worker_connections 4096; | |
# multi_accept on; | |
} | |
``` | |
複数台構成にするなら keep aliveが多めにするとtcp connectiongが使い回せる可能性 | |
``` | |
upstream app { | |
server 192.168.0.12:8080; | |
keepalive 2048; | |
} | |
``` | |
pprof | |
https://zenn.dev/team_soda/articles/d4701665e8a3a7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment