最新帖子 精华区 社区服务 会员列表 统计排行 道具中心 银行
主题 : 为什么配置好的server反而mysql服务运行效果差
david 离线
级别: 新手上路
显示用户信息 
0  发表于: 2009-11-28 14:38
0

为什么配置好的server反而mysql服务运行效果差

我是mysql的初学者,向馆主请教一个问题。
应用程序跑在一台server上,mysql服务跑在另外一台server上,两台server内网相连。
DB server A配置:pentium(R) D 3.4GX2  内存 4G  
DB server B配置:Xeon(R)  2.33GX4        内存 8G  
都是2003 server系统,但是在应用程序的数据库操作请求处理速度看,server A的性能明显要好,应用程序是一样的。
是不是因为my.ini配置的问题,但是尝试调试my.ini多次,始终DB server B的性能不如 DB server A。
此类问题应该从那几个方面着手解决,希望多多指教。
sky000 离线
www.jianzhaoyang.com
级别: 总版主
显示用户信息 
1  发表于: 2009-11-30 12:58
理论上不应该出现这样的问题的
有没有到数据库上面看一下运行的SQL哪些慢?

能否将配置文件帖上来看看呢?
我是说数据库的配置文件
邮件组:mysqler@googlegroups.com
个人网站:http://www.jianzhaoyang.com
From:Unknown 顶端
david 离线
级别: 新手上路
显示用户信息 
2  发表于: 2009-12-01 21:04
这是 DB serverB的配置
[client]
back_log = 50
max_connections = 200
max_connect_errors = 100
table_open_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 256M
join_buffer_size = 8M
thread_cache_size = 16
thread_concurrency = 8
query_cache_size = 64M
query_cache_limit = 2M
ft_min_word_len = 4
thread_stack = 192K
tmp_table_size = 128M
long_query_time = 2

#*** MyISAM Specific options
key_buffer_size = 800M
read_buffer_size = 32M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 256M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1

# *** INNODB Specific options ***
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 512M
innodb_file_io_threads = 16
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
[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
# Only allow UPDATEs and DELETEs that use keys.
#safe-updates
[myisamchk]
key_buffer_size = 800M
sort_buffer_size = 256M
read_buffer = 32M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192

From:Unknown 顶端
david 离线
级别: 新手上路
显示用户信息 
3  发表于: 2009-12-01 21:15
这是DBserver A的配置:

[client]
back_log = 50
max_connections = 200
max_connect_errors = 100
table_open_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 256M
join_buffer_size = 8M
thread_cache_size = 16
thread_concurrency = 8
query_cache_size = 64M
query_cache_limit = 2M
ft_min_word_len = 4
thread_stack = 192K
tmp_table_size = 128M
long_query_time = 2

#*** MyISAM Specific options
key_buffer_size = 800M
read_buffer_size = 32M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 256M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1

# *** INNODB Specific options ***
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 512M
innodb_file_io_threads = 16
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
[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
# Only allow UPDATEs and DELETEs that use keys.
#safe-updates
[myisamchk]
key_buffer_size = 800M
sort_buffer_size = 256M
read_buffer = 32M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192

ps:罗列的是否够全,不全的话,如有缺少,请指教
From:Unknown 顶端
快速回复 顶端
内容
HTML 代码不可用
使用签名
Wind Code自动转换

认证码:
验证问题:100-1=?  正确答案:99
按 Ctrl+Enter 直接提交