بنقرة واحدة
mysql-buffer-tuning
Tune MySQL InnoDB buffer pool and query settings for ISUCON workloads
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Tune MySQL InnoDB buffer pool and query settings for ISUCON workloads
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
MCP tool reference — exec, benchmark_start, benchmark_status, note_write, etc. Use when: executing commands on VMs, running benchmarks, or recording findings
ISUCON13 contest manual — server topology, service management, benchmark execution, and rules. Use when: checking environment setup, running benchmarks, or understanding contest constraints
ISUPipe application manual — features, terms, constraints, and API specs. Use when: understanding the app domain, checking API behavior or MUST/MAY requirements
General strategy for identifying and adding missing database indexes in ISUCON web applications
General techniques for optimizing user icon/avatar image serving in ISUCON web applications
General techniques for identifying and fixing N+1 query problems in ISUCON web applications
| name | mysql-buffer-tuning |
| description | Tune MySQL InnoDB buffer pool and query settings for ISUCON workloads |
Tune MySQL server settings for the ISUCON workload (short benchmark, high concurrency).
Create or update /etc/mysql/mysql.conf.d/isucon.cnf:
[mysqld]
# Buffer pool — use ~70% of available RAM
innodb_buffer_pool_size = 1G
# Flush behavior — prioritize speed over durability (ISUCON is not production)
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
# Log file size — larger = fewer checkpoints
innodb_log_file_size = 256M
# Disable binary log (not needed for single-server ISUCON)
disable_log_bin
# Disable performance schema (saves ~200MB RAM)
performance_schema = OFF
# Connection limits
max_connections = 200
exec host="vm1" command="sudo tee /etc/mysql/mysql.conf.d/isucon.cnf << 'EOF'
[mysqld]
innodb_buffer_pool_size = 1G
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_log_file_size = 256M
disable_log_bin
performance_schema = OFF
max_connections = 200
EOF"
Then restart MySQL:
exec host="vm1" command="sudo systemctl restart mysql"
exec host="vm1" command="mysql -u isucon -pisucon -e \"
SHOW VARIABLES LIKE 'innodb_buffer_pool_size';
SHOW VARIABLES LIKE 'innodb_flush_log_at_trx_commit';
SHOW VARIABLES LIKE 'max_connections';
SHOW VARIABLES LIKE 'performance_schema';
\""
Contest VMs are Standard_D2s_v5 (8 GiB RAM). Budget:
If using multi-server distribution, the DB-only VM can use innodb_buffer_pool_size = 4G.