提問三步曲: 提問先看教程/FAQ索引(wdcp,wdcp_v3,一鍵包)及搜索,會讓你更快解決問題
1 提供詳細,如系統(tǒng)版本,wdcp版本,軟件版本等及錯誤的詳細信息,貼上論壇或截圖發(fā)論壇
2 做過哪些操作或改動設置等
溫馨提示:信息不詳,很可能會沒人理你!論壇有教程說明的,也可能沒人理!因為,你懂的
各位linux達人,我剛弄linux服務器,菜蟲一個,幫忙看下下面的配置哪些不合理,有哪些重要的配置沒弄,
服務器主要用于app的訪問,沒有頁面。數據庫也不大?墒怯袝r會很慢。遠程xshell連接輸入個字符都要近一分鐘左右才看到,帶寬是2M的
,不知道瓶頸在哪里,top看資源使用的時候cpu使用率很低。內存也沒用完,可就是很慢。 ,望指點
1.硬件:(阿里云的)CPU:Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz 4核
內存:4G
2.系統(tǒng):
Ubuntu 12.04 64位 安全加固版,裝了tomcat6,mysql5.1 wdcp 2.5
3.tomcat 配置:
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"
maxActive="400"
maxIdle="10"
maxWait="18000000"/>
</GlobalNamingResources>
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443"
maxThreads="500"
minSpareThreads="10"
maxSpareThreads="100"
acceptCount="100"
enableLookups="false"
/>
4.Mysql配置:
[mysqld]
port
= 3306
socket
= /tmp/mysql.sock
init_connect = 'SET autocommit=0'
skip-locking
key_buffer_size = 256M
max_allowed_packet = 16M
table_open_cache = 512
sort_buffer_size = 32M
net_buffer_length = 512K
read_buffer_size = 10M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
wait_timeout = 2880000
interactive_timeout = 2880000
net_read_timeout = 10
max_connections = 500
net_retry_count = 2
tmp_table_size = 50M
table_cache=512
query_cache_size = 64M
thread_cache_size = 16
# log slow query
log-slow-queries = /var/lib/mysql/my.slow.log
long_query_time = 1
# log-queries-not-using-indexes = 1
# log-slow-admin-statements = 1
server-id
= 1
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /www/wdlinux/mysql-5.1.61/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /www/wdlinux/mysql-5.1.61/var
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 1G
innodb_additional_mem_pool_size = 16M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 256M
innodb_log_files_in_group=3
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 50
innodb_file_per_table=1
innodb_file_io_threads=4
innodb_open_files=500
innodb_flush_method=O_DIRECT
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
5.JAVA配置:
export JAVA_OPTS="-server -Xms512m -Xmx1024m -XX ermSize=128m -XX:MaxNewSize=512m -XX:MaxPermSize=512m -Djava.awt.headless=true" |