免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5997 | 回复: 12
打印 上一主题 下一主题

mysql5.4.2 ibdata1增长过大 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-25 13:42 |只看该作者 |倒序浏览
数据库配置文件如下:
[client]
port                    = 3307
socket                  = /tmp/mysql_3307.sock
[mysqld]
port                    = 3307
socket                  = /tmp/mysql_3307.sock
back_log                = 500

key_buffer              = 384M
max_connections         = 4096
max_allowed_packet      = 16M
max_heap_table_size     = 64M
table_cache             = 2048
sort_buffer_size        = 32M
join_buffer_size        = 32M
read_buffer_size        = 2M
read_rnd_buffer_size    = 16M
query_cache_size        = 64M
query_cache_limit       = 8M
ft_min_word_len         = 4
myisam_sort_buffer_size = 64M
transaction_isolation   = REPEATABLE-READ
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size       = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads   = 1
myisam_recover
skip-locking

# Try number of CPU's*2 for thread_concurrency
thread_concurrency      = 8
thread_cache_size       = 8

net_buffer_length       = 2K
thread_stack            = 131072
character-set-server    = utf8
collation-server        = utf8_general_ci
default-character-set   = utf8
tmp_table_size          = 200M

binlog_cache_size       = 2M
max_heap_table_size     = 64M
long_query_time         = 1
log-bin                 = /data1/mysql542_3307/logs/mysql_3307
slow_query_log_file     = /data1/mysql542_3307/logs/slowquery.log
slow_query_log
log_long_format

#Added for InnoDB config
innodb_data_file_path           = ibdata1:8388608000;ibdata2:31457280000;ibdata3:200M:autoextend:max:80000M
innodb_buffer_pool_size         = 10G
innodb_additional_mem_pool_size = 50M
#innodb_file_io_threads         = 4
innodb_thread_concurrency       = 0
innodb_flush_log_at_trx_commit  = 1
innodb_max_dirty_pages_pct      = 90
innodb_lock_wait_timeout        = 50
innodb_log_group_home_dir       = /data1/mysql542_3307/logs
innodb_log_files_in_group       = 2
innodb_log_file_size            = 256M
innodb_log_buffer_size          = 8M
innodb_status_file              = 1
innodb_flush_method             = O_DIRECT
sync-binlog=1
innodb_file_per_table

[mysqldump]
# Do not buffer the whole result set in memory before writing it to
# file. Required for dumping very large tables
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192

服务器16G内存,2*双核CPU,昨天不知什么原因开始数据猛增,以至于已经3次修改innodb_data_file_path 。

论坛徽章:
0
2 [报告]
发表于 2009-09-25 13:43 |只看该作者
show innodb status:
=====================================
090925 11:08:42 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 2 seconds
----------
BACKGROUND THREAD
----------
srv_master_thread loops: 6303 1_second, 661 sleeps, 630 10_second, 3 background, 3 flush
srv_master_thread log flush and writes: 949  log writes only: 23059
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 531298, signal count 125602
Mutex spin waits 931974, rounds 18799310, OS waits 490086
RW-shared spins 12177, OS waits 11710; RW-excl spins 44099, OS waits 24886
Spin rounds per wait: 20.17 mutex, 29.89 RW-shared, 19.93 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 23AD0EB
Purge done for trx's n < 23ACD95 undo n < 0
History list length 343
... truncated...
1 row lock(s), undo log entries 1
MySQL thread id 1483, query id 3479007 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE4A, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1502914880
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1781, query id 3479005 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE49, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1444116800
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1109, query id 3479008 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE48, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1324087616
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 95, query id 3479095 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE46, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1492371776
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1659, query id 3479006 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE45, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1475340608
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1444, query id 3479065 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE44, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1445603648
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1142, query id 3478997 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE43, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1446684992
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1152, query id 3479055 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE42, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1434384704
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 958, query id 3479061 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE41, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1323952448
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 94, query id 3478995 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE40, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1500481856
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1755, query id 3479114 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE3F, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1455335744
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1252, query id 3478996 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE3E, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1456687424
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1267, query id 3478972 192.168.1.83 cutedb
commit
---TRANSACTION 23ACE31, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1505753408
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1810, query id 3478867 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE29, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1474394432
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1429, query id 3478913 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE26, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1486829888
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1569, query id 3478802 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE25, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1485343040
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1558, query id 3478800 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE24, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1494264128
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1672, query id 3478799 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE23, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1329764672
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 137, query id 3478798 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE22, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1492101440
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1652, query id 3478832 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE21, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1427355968
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 892, query id 3478838 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE20, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1424787776
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 871, query id 3478794 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1F, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1488046400
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1590, query id 3478796 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1E, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1509538112
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1864, query id 3478792 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1D, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1489938752
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1634, query id 3478797 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1C, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1474799936
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1454, query id 3478788 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1B, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1328953664
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 131, query id 3478795 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE1A, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1431681344
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 930, query id 3478786 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE19, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1478043968
3 lock struct(s), heap size 368, 2 row lock(s), undo log entries 1
MySQL thread id 1484, query id 3478820 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE18, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1438169408
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1010, query id 3478782 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE17, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1330035008
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 139, query id 3478849 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE16, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1509943616
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1869, query id 3478815 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE15, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1449929024
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1183, query id 3478775 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE14, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1493317952
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1663, query id 3478809 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE13, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1443305792
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1083, query id 3478785 192.168.1.82 cutedb
commit
---TRANSACTION 23ACE11, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1489803584
3 lock struct(s), heap size 368, 2 row lock(s), undo log entries 1
MySQL thread id 1638, query id 3478769 192.168.1.82 cutedb
commit
---TRANSACTION 23ACDFA, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1324493120
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 98, query id 3478520 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF8, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1481558336
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1514, query id 3478539 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF7, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1478990144
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1489, query id 3478501 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF6, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1455606080
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1256, query id 3478479 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF5, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1469528384
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1373, query id 3478569 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF4, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1476016448
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1453, query id 3478526 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF2, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1468852544
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1368, query id 3478467 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDF1, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1505618240
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1809, query id 3478542 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDEE, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1483721024
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1535, query id 3478466 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDED, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1501698368
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1761, query id 3478485 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDEC, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1495615808
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 1707, query id 3478470 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDEB, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1471826240
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1393, query id 3478627 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDEA, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1494669632
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1680, query id 3478538 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDE7, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1437088064
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 995, query id 3478362 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDDC, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1323682112
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 92, query id 3478308 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDDB, ACTIVE (PREPARED) 0 sec, process no 18025, OS thread id 1468041536
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1362, query id 3478296 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDC0, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1491020096
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1642, query id 3478196 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBF, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1467771200
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1360, query id 3478130 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBE, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1507510592
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1844, query id 3478129 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBD, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1495075136
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1687, query id 3478136 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBC, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1441954112
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1069, query id 3478142 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBB, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1483856192
3 lock struct(s), heap size 368, 2 row lock(s), undo log entries 1
MySQL thread id 1537, query id 3478202 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDBA, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1479530816
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1493, query id 3478140 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDB9, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1512511808
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 1904, query id 3478110 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDB7, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1317464384
1 lock struct(s), heap size 368, 0 row lock(s), undo log entries 1
MySQL thread id 31, query id 3478108 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDB6, ACTIVE (PREPARED) 1 sec, process no 18025, OS thread id 1318005056
2 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1
MySQL thread id 35, query id 3478102 192.168.1.83 cutedb
commit
---TRANSACTION 23ACDB5, ACTIVE 1 sec, process no 18025, OS thread id 1526163776 starting index read
mysql tables in use 16, locked 16
LOCK WAIT 2 lock struct(s), heap size 368, 1 row lock(s)
MySQL thread id 2109, query id 3477969 192.168.1.83 cutedb Updating
UPDATE cute_user SET CU_PIGS=22  WHERE CU_UID = 988626
------- TRX HAS BEEN WAITING 1 SEC FOR THIS LOCK TO BE GRANTED:

论坛徽章:
0
3 [报告]
发表于 2009-09-25 13:44 |只看该作者
+-----------------------------------+-------------+
| Variable_name                     | Value       |
+-----------------------------------+-------------+
| Aborted_clients                   | 2           |
| Aborted_connects                  | 0           |
| Binlog_cache_disk_use             | 0           |
| Binlog_cache_use                  | 315764      |
| Bytes_received                    | 115         |
| Bytes_sent                        | 174         |
| Com_admin_commands                | 0           |
| Com_assign_to_keycache            | 0           |
| Com_alter_db                      | 0           |
| Com_alter_db_upgrade              | 0           |
| Com_alter_event                   | 0           |
| Com_alter_function                | 0           |
| Com_alter_procedure               | 0           |
| Com_alter_server                  | 0           |
| Com_alter_table                   | 0           |
| Com_alter_tablespace              | 0           |
| Com_analyze                       | 0           |
| Com_backup_table                  | 0           |
| Com_begin                         | 0           |
| Com_binlog                        | 0           |
| Com_call_procedure                | 0           |
| Com_change_db                     | 0           |
| Com_change_master                 | 0           |
| Com_check                         | 0           |
| Com_checksum                      | 0           |
| Com_commit                        | 0           |
| Com_create_db                     | 0           |
| Com_create_event                  | 0           |
| Com_create_function               | 0           |
| Com_create_index                  | 0           |
| Com_create_procedure              | 0           |
| Com_create_server                 | 0           |
| Com_create_table                  | 0           |
| Com_create_trigger                | 0           |
| Com_create_udf                    | 0           |
| Com_create_user                   | 0           |
| Com_create_view                   | 0           |
| Com_dealloc_sql                   | 0           |
| Com_delete                        | 0           |
| Com_delete_multi                  | 0           |
| Com_do                            | 0           |
| Com_drop_db                       | 0           |
| Com_drop_event                    | 0           |
| Com_drop_function                 | 0           |
| Com_drop_index                    | 0           |
| Com_drop_procedure                | 0           |
| Com_drop_server                   | 0           |
| Com_drop_table                    | 0           |
| Com_drop_trigger                  | 0           |
| Com_drop_user                     | 0           |
| Com_drop_view                     | 0           |
| Com_empty_query                   | 0           |
| Com_execute_sql                   | 0           |
| Com_flush                         | 0           |
| Com_grant                         | 0           |
| Com_ha_close                      | 0           |
| Com_ha_open                       | 0           |
| Com_ha_read                       | 0           |
| Com_help                          | 0           |
| Com_insert                        | 0           |
| Com_insert_select                 | 0           |
| Com_install_plugin                | 0           |
| Com_kill                          | 0           |
| Com_load                          | 0           |
| Com_load_master_data              | 0           |
| Com_load_master_table             | 0           |
| Com_lock_tables                   | 0           |
| Com_optimize                      | 0           |
| Com_preload_keys                  | 0           |
| Com_prepare_sql                   | 0           |
| Com_purge                         | 0           |
| Com_purge_before_date             | 0           |
| Com_release_savepoint             | 0           |
| Com_rename_table                  | 0           |
| Com_rename_user                   | 0           |
| Com_repair                        | 0           |
| Com_replace                       | 0           |
| Com_replace_select                | 0           |
| Com_reset                         | 0           |
| Com_restore_table                 | 0           |
| Com_revoke                        | 0           |
| Com_revoke_all                    | 0           |
| Com_rollback                      | 0           |
| Com_rollback_to_savepoint         | 0           |
| Com_savepoint                     | 0           |
| Com_select                        | 1           |
| Com_set_option                    | 0           |
| Com_show_authors                  | 0           |
| Com_show_binlog_events            | 0           |
| Com_show_binlogs                  | 0           |
| Com_show_charsets                 | 0           |
| Com_show_collations               | 0           |
| Com_show_column_types             | 0           |
| Com_show_contributors             | 0           |
| Com_show_create_db                | 0           |
| Com_show_create_event             | 0           |
| Com_show_create_func              | 0           |
| Com_show_create_proc              | 0           |
| Com_show_create_table             | 0           |
| Com_show_create_trigger           | 0           |
| Com_show_databases                | 0           |
| Com_show_engine_logs              | 0           |
| Com_show_engine_mutex             | 0           |
| Com_show_engine_status            | 0           |
| Com_show_events                   | 0           |
| Com_show_errors                   | 0           |
| Com_show_fields                   | 0           |
| Com_show_function_status          | 0           |
| Com_show_grants                   | 0           |
| Com_show_keys                     | 0           |
| Com_show_master_status            | 0           |
| Com_show_new_master               | 0           |
| Com_show_open_tables              | 0           |
| Com_show_plugins                  | 0           |
| Com_show_privileges               | 0           |
| Com_show_procedure_status         | 0           |
| Com_show_processlist              | 0           |
| Com_show_profile                  | 0           |
| Com_show_profiles                 | 0           |
| Com_show_slave_hosts              | 0           |
| Com_show_slave_status             | 0           |
| Com_show_status                   | 1           |
| Com_show_storage_engines          | 0           |
| Com_show_table_status             | 0           |
| Com_show_tables                   | 0           |
| Com_show_triggers                 | 0           |
| Com_show_variables                | 0           |
| Com_show_warnings                 | 0           |
| Com_slave_start                   | 0           |
| Com_slave_stop                    | 0           |
| Com_stmt_close                    | 0           |
| Com_stmt_execute                  | 0           |
| Com_stmt_fetch                    | 0           |
| Com_stmt_prepare                  | 0           |
| Com_stmt_reprepare                | 0           |
| Com_stmt_reset                    | 0           |
| Com_stmt_send_long_data           | 0           |
| Com_truncate                      | 0           |
| Com_uninstall_plugin              | 0           |
| Com_unlock_tables                 | 0           |
| Com_update                        | 0           |
| Com_update_multi                  | 0           |
| Com_xa_commit                     | 0           |
| Com_xa_end                        | 0           |
| Com_xa_prepare                    | 0           |
| Com_xa_recover                    | 0           |
| Com_xa_rollback                   | 0           |
| Com_xa_start                      | 0           |
| Compression                       | OFF         |
| Connections                       | 2127        |
| Created_tmp_disk_tables           | 0           |
| Created_tmp_files                 | 4           |
| Created_tmp_tables                | 0           |
| Delayed_errors                    | 0           |
| Delayed_insert_threads            | 0           |
| Delayed_writes                    | 0           |
| Flush_commands                    | 1           |
| Handler_commit                    | 0           |
| Handler_delete                    | 0           |
| Handler_discover                  | 0           |
| Handler_prepare                   | 0           |
| Handler_read_first                | 0           |
| Handler_read_key                  | 0           |
| Handler_read_next                 | 0           |
| Handler_read_prev                 | 0           |
| Handler_read_rnd                  | 0           |
| Handler_read_rnd_next             | 0           |
| Handler_rollback                  | 0           |
| Handler_savepoint                 | 0           |
| Handler_savepoint_rollback        | 0           |
| Handler_update                    | 0           |
| Handler_write                     | 0           |
| Innodb_buffer_pool_pages_data     | 566569      |
| Innodb_buffer_pool_pages_dirty    | 44696       |
| Innodb_buffer_pool_pages_flushed  | 368282      |
| Innodb_buffer_pool_pages_free     | 88706       |
| Innodb_buffer_pool_pages_misc     | 84          |
| Innodb_buffer_pool_pages_total    | 655359      |
| Innodb_buffer_pool_read_ahead_rnd | 0           |
| Innodb_buffer_pool_read_ahead_seq | 26          |
| Innodb_buffer_pool_read_requests  | 148884968   |
| Innodb_buffer_pool_reads          | 395043      |
| Innodb_buffer_pool_wait_free      | 0           |
| Innodb_buffer_pool_write_requests | 4447026     |
| Innodb_data_fsyncs                | 544151      |
| Innodb_data_pending_fsyncs        | 0           |
| Innodb_data_pending_reads         | 1           |
| Innodb_data_pending_writes        | 0           |
| Innodb_data_read                  | 6648647680  |
| Innodb_data_reads                 | 405101      |
| Innodb_data_writes                | 709893      |
| Innodb_data_written               | 12690390016 |
| Innodb_dblwr_pages_written        | 368282      |
| Innodb_dblwr_writes               | 6632        |
| Innodb_have_atomic_builtins       | ON          |
| Innodb_log_waits                  | 0           |
| Innodb_log_write_requests         | 794031      |
| Innodb_log_writes                 | 488242      |
| Innodb_os_log_fsyncs              | 477168      |
| Innodb_os_log_pending_fsyncs      | 0           |
| Innodb_os_log_pending_writes      | 0           |
| Innodb_os_log_written             | 620915712   |
| Innodb_page_size                  | 16384       |
| Innodb_pages_created              | 160902      |
| Innodb_pages_read                 | 405667      |
| Innodb_pages_written              | 368282      |
| Innodb_row_lock_current_waits     | 1           |
| Innodb_row_lock_time              | 1900510     |
| Innodb_row_lock_time_avg          | 988         |
| Innodb_row_lock_time_max          | 5139        |
| Innodb_row_lock_waits             | 1922        |
| Innodb_rows_deleted               | 3           |
| Innodb_rows_inserted              | 43548       |
| Innodb_rows_read                  | 919333949   |
| Innodb_rows_updated               | 272606      |
| Key_blocks_not_flushed            | 0           |
| Key_blocks_unused                 | 319666      |
| Key_blocks_used                   | 0           |
| Key_read_requests                 | 0           |
| Key_reads                         | 0           |
| Key_write_requests                | 0           |
| Key_writes                        | 0           |
| Last_query_cost                   | 0.000000    |
| Max_used_connections              | 1602        |
| Not_flushed_delayed_rows          | 0           |
| Open_files                        | 19          |
| Open_streams                      | 0           |
| Open_table_definitions            | 24          |
| Open_tables                       | 926         |
| Opened_files                      | 910         |
| Opened_table_definitions          | 0           |
| Opened_tables                     | 0           |
| Prepared_stmt_count               | 1068        |
| Qcache_free_blocks                | 198         |
| Qcache_free_memory                | 66598272    |
| Qcache_hits                       | 0           |
| Qcache_inserts                    | 100775      |
| Qcache_lowmem_prunes              | 0           |
| Qcache_not_cached                 | 61497       |
| Qcache_queries_in_cache           | 375         |
| Qcache_total_blocks               | 953         |
| Queries                           | 3581737     |
| Questions                         | 2           |
| Rpl_status                        | NULL        |
| Select_full_join                  | 0           |
| Select_full_range_join            | 0           |
| Select_range                      | 0           |
| Select_range_check                | 0           |
| Select_scan                       | 0           |
| Slave_open_temp_tables            | 0           |
| Slave_retried_transactions        | 0           |
| Slave_running                     | OFF         |
| Slow_launch_threads               | 0           |
| Slow_queries                      | 0           |
| Sort_merge_passes                 | 0           |
| Sort_range                        | 0           |
| Sort_rows                         | 0           |
| Sort_scan                         | 0           |
| Ssl_accept_renegotiates           | 0           |
| Ssl_accepts                       | 0           |
| Ssl_callback_cache_hits           | 0           |
| Ssl_cipher                        |             |
| Ssl_cipher_list                   |             |
| Ssl_client_connects               | 0           |
| Ssl_connect_renegotiates          | 0           |
| Ssl_ctx_verify_depth              | 0           |
| Ssl_ctx_verify_mode               | 0           |
| Ssl_default_timeout               | 0           |
| Ssl_finished_accepts              | 0           |
| Ssl_finished_connects             | 0           |
| Ssl_session_cache_hits            | 0           |
| Ssl_session_cache_misses          | 0           |
| Ssl_session_cache_mode            | NONE        |
| Ssl_session_cache_overflows       | 0           |
| Ssl_session_cache_size            | 0           |
| Ssl_session_cache_timeouts        | 0           |
| Ssl_sessions_reused               | 0           |
| Ssl_used_session_cache_entries    | 0           |
| Ssl_verify_depth                  | 0           |
| Ssl_verify_mode                   | 0           |
| Ssl_version                       |             |
| Table_locks_immediate             | 16735063    |
| Table_locks_waited                | 0           |
| Tc_log_max_pages_used             | 0           |
| Tc_log_page_size                  | 0           |
| Tc_log_page_waits                 | 0           |
| Threads_cached                    | 1           |
| Threads_connected                 | 1601        |
| Threads_created                   | 1602        |
| Threads_running                   | 618         |
| Uptime                            | 1103        |
| Uptime_since_flush_status         | 1103        |
+-----------------------------------+-------------+

现在数据还在增长,大家有碰到过这样的情况么,如何解决?

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
4 [报告]
发表于 2009-09-25 14:49 |只看该作者
你是怎么知道增长过大的
事务量很少?

论坛徽章:
0
5 [报告]
发表于 2009-09-25 15:15 |只看该作者
前天开始,ibdata1文件猛增,表是独占空间的,不应该在ibdata1里写入很多数据的啊,事务比较频繁,是web小游戏,用户大概在40W,20W活跃度

论坛徽章:
0
6 [报告]
发表于 2009-09-25 15:18 |只看该作者
看看 data  下物理文件大小

论坛徽章:
0
7 [报告]
发表于 2009-09-25 15:21 |只看该作者
-rw-rw---- 1 mysql mysql 7.9G Sep 25 15:20 ibdata1
-rw-rw---- 1 mysql mysql  30G Sep 25 10:56 ibdata2
-rw-rw---- 1 mysql mysql  49G Sep 25 15:20 ibdata3
这是3次使用的文件。增长很快,ibdata3是上午刚加的

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
8 [报告]
发表于 2009-09-25 15:51 |只看该作者
到information_schema库看看table表,看看各表占用的空间分别多少。

是数据确实存在这么多还是因为碎片。如果是果是碎片,执行一下NULL操作看看。
ALTER TABLE tbl_name ENGINE=INNODB

论坛徽章:
0
9 [报告]
发表于 2009-09-25 16:24 |只看该作者
TABLE_TYPE: BASE TABLE
         ENGINE: InnoDB
        VERSION: 10
     ROW_FORMAT: Compact
     TABLE_ROWS: 37901879
AVG_ROW_LENGTH: 339
    DATA_LENGTH: 12878315520
MAX_DATA_LENGTH: 0
   INDEX_LENGTH: 6002769920
      DATA_FREE: 370147328
AUTO_INCREMENT: 37929741
    CREATE_TIME: NULL
    UPDATE_TIME: NULL
     CHECK_TIME: NULL
TABLE_COLLATION: utf8_general_ci
       CHECKSUM: NULL
CREATE_OPTIONS: partitioned

这是最大的一个表大概有12G了


怎么查看碎片? NULL操作是做什么用的?

论坛徽章:
0
10 [报告]
发表于 2009-09-27 10:41 |只看该作者
在配置了innodb_file_per_table后,ibdate主要存储的是什么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP