中国真实偷乱视频,东京道一本热中文字幕,久久精品国产99国产精品亚洲,欧美激情一区二区三区在线

Board logo

標(biāo)題: [求助] 望各位大大指教下這個(gè)配置 [打印本頁(yè)]

作者: 執(zhí)戀    時(shí)間: 2013-8-30 19:28     標(biāo)題: 望各位大大指教下這個(gè)配置

各位linux達(dá)人,我剛弄linux服務(wù)器,菜蟲一個(gè),幫忙看下下面的配置哪些不合理,有哪些重要的配置沒(méi)弄,
服務(wù)器主要用于app的訪問(wèn),沒(méi)有頁(yè)面。數(shù)據(jù)庫(kù)也不大。可是有時(shí)會(huì)很慢。遠(yuǎn)程xshell連接輸入個(gè)字符都要近一分鐘左右才看到,帶寬是2M的
,不知道瓶頸在哪里,top看資源使用的時(shí)候cpu使用率很低。內(nèi)存也沒(méi)用完,可就是很慢。,望指點(diǎn)



1.硬件:(阿里云的)CPU:Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz 4核
內(nèi)存: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 -XXermSize=128m -XX:MaxNewSize=512m -XX:MaxPermSize=512m -Djava.awt.headless=true"




歡迎光臨 WDlinux官方論壇 (http://ahbydz.com/bbs/) Powered by Discuz! 7.2