【教学分享】OA性能问题]OA系统访问缓慢参数优化
金蝶云社区-云鸡蒜
云鸡蒜
0人赞赏了该文章 674次浏览 未经作者许可,禁止转载编辑于2016年07月18日 18:32:48
1: 检查OA配置文件1.1查看单独OA环境,路径为kingdeeOA\firstframe\bin\set-server-env.bat(linux环境为set-server-env.sh)文件,修改参数为如图所示标红的数字。


1.2:集成环境D:\programe\Kingdee75\eas\server\profiles\oa\bin\set-server-env.bat(linux环境为set-server-env.sh)文件,修改参数为如图所示标红的数字。

2:检查tomcat配置文件,添加网页压缩路径为D:\programe\kingdeeOA\Tomcat_5.5\conf\server.xml修改maxThreads=300,添加下面四个参数为如图所示位置compression=”on” compressionMinSize=”2048”noCompressionUserAgents="gozilla,traviata" compressableMimeType="text/html,text/xml",

3:如果数据库使用的是oracle数据库查看系统资源第一步:查看是否有死锁存在,查出有数据则代表有死锁 selectp.spid,c.object_name,b.session_id,b.oracle_username,b.os_user_name from v$process p,v$session a,v$locked_objectb,all_objects c where p.addr=a.paddr and a.process=b.process and c.object_id=b.object_id 第二步:查出死锁session的精确信息【sid 为前面语句的session_id】 SELECT sid, serial#, username, osuser FROMv$session where sid='第一步查询出来的session_id';
alter system kill session '第一个参数,第二个参数';
第三步:SELECT resource_name,current_utilization,max_utilization,LIMIT,ROUND (max_utilization/ LIMIT * 100) || '%' rate FROM (SELECT resource_name,current_utilization,max_utilization,TO_NUMBER(initial_allocation) LIMIT FROM v$resource_limit WHERE resource_name IN('processes', 'sessions') AND max_utilization > 0);RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION LIMIT RATE------------------------------------------------- --------------- ---------- -----processes 312 500 500 100%sessions 317 509 555 92%发现是资源不足。处理方法是:alter system set processes=1000scope=spfile;alter system set sessions=1110scope=spfile; 然后重启数据库
4:给OA表建索引create index index_file2 onworkflow_file(user_id);create index index_file3 onworkflow_file(flow_id);create index index_file4 onworkflow_file(flowtype_id);create index index_file5 onworkflow_file(dept_id);create index index_file6 onworkflow_file(submitdate);create index index_fileattach1 onworkflow_fileattach (file_id);create index index_fileattach2 onworkflow_fileattach (user_id);create index index_fileattach3 onworkflow_fileattach (topic_id);create index index_fileattach4 onworkflow_fileattach (outuser_id);create index index_fileinbox2 on workflow_fileinbox(file_id);create index index_fileinbox3 onworkflow_fileinbox(user_id);create index index_fileinbox4 onworkflow_fileinbox(startdate);create index index_fileinbox5 onworkflow_fileinbox(flow_id);create index index_fileinbox6 on workflow_fileinbox(step_id);create index index_fileinbox7 onworkflow_fileinbox(token);create index index_fileprocess2 onworkflow_fileprocess(file_id);create index index_fileprocess3 onworkflow_fileprocess(step_pid);create index index_fileprocess4 on workflow_fileprocess(user_pid);create index index_fileprocess5 onworkflow_fileprocess(step_id);create index index_fileprocess6 onworkflow_fileprocess(user_id);create index index_fileprocess7 onworkflow_fileprocess(inbox_id);create index index_fileprocess8 onworkflow_fileprocess(token_id);create index index_fileno2 onworkflow_fileno(flowtype_id);create index index_fileopinion2 onworkflow_fileopinion(file_id);create index index_fileopinion3 onworkflow_fileopinion(step_id);create index index_fileopinion4 onworkflow_fileopinion(user_id);create index index_flowfield1 onworkflow_flowfield(flowtype_id);create index index_sysusers_1 onsystem_users (superior);create index index_sysusers_2 onsystem_users (dept_id);create index index_sysusers_3 onsystem_users (ucdept_id);create index index_sysusers_4 onsystem_users (loginid);create index index_sysdept_1 onsystem_depts (superior);create index index_sysdept_2 onsystem_depts (ucdept_id);create index index_sysarea_1 onsystem_area (dept_id);create index index_sysposmember_1 onsystem_positionmember (user_id);create index index_sysposmember_2 onsystem_positionmember (position_id);create index index_docexfileattach1 ondocex_fileattach (file_id);create index index_docexfileattach2 ondocex_fileattach (user_id);create index index_docexfileattach3 ondocex_fileattach (fileopinion_id);create index index_docexfileattach4 ondocex_fileattach (topic_id);create index index_docexfileattach5 ondocex_fileattach (createdate);create index index_docexfiledetail1 ondocex_filedetail (file_id);create index index_docexfiledetail2 ondocex_filedetail (readuser_id);create index index_docexfiledetail3 ondocex_filedetail (createdate);create index index_docexfileopinion1 ondocex_fileopinion (user_id);create index index_docexfileopinion2 ondocex_fileopinion (docexfile_id);create index index_docexfileopinion3 ondocex_fileopinion (docexfiledetail_id);
5:查看操作日志是否启用,如果启用,建议关掉 应用管理-操作日志-log4j属性文件修改,启用改为禁用
6:检查操作系统位数假如上述都做完,系统还是有些慢,建议查看操作系统是否为32位,如果为32位,升级操作系统为64位,然后OA中使用64位的jdk。Jdk可以去官网下载,建议去官网下载jdk1.6.
7:设置linux系统优化参数vmstat 1 100 [table]
[tr][td=568] procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 20 0 344 176328 831232 21149040 0 0 5 10 0 0 2 1 97 0 0 4 0 344 203572 831232 21149096 0 0 0 1108 4749 14903 13 8 79 0 0 3 0 344 201728 831236 21149100 0 0 0 0 4490 13190 13 7 79 0 0 4 0 344 185884 831236 21149112 0 0 0 0 4536 12622 11 6 82 0 0 4 0 344 193660 831236 21149116 0 0 0 108 5026 16093 15 7 78 0 0 3 0 344 203228 831236 21149132 0 0 0 0 4680 14478 15 10 75 0 0 10 0 344 188824 831236 21149132 0 0 0 596 3736 14245 12 6 82 0 0 4 0 344 203312 831240 21149136 0 0 0 0 3584 12096 11 11 78 0 0 3 0 344 209528 831244 21149136 0 0 0 0 4953 14557 15 5 80 0 0
[tr][td=568] 如果prices(r)存在大量大于3的数字,表示CPU负载过大,数字越大负载越大,系统越慢,需要做优化。
tail -100f /var/log/messages[table]
[tr][td=568] Jul 10 04:02:02 easserver syslogd 1.4.1: restart. Jul 12 10:00:01 easserver auditd[5909]: Audit daemon rotating log files Jul 12 14:32:53 easserver snmpd[20177]: looks like a 64bit wrap, but prev!=new Jul 12 17:12:35 easserver kernel: printk: 19 messages suppressed.
[tr][td=568]查看有没有tcp等待,如果存在tcp等待情况,需要优化参数
设置内核参数:[table]
[tr][td=568] #2011 added net.ipv4.conf.lo.arp_ignore = 1 net.ipv4.conf.lo.arp_announce = 2 net.ipv4.conf.all.arp_ignore = 1 net.ipv4.conf.all.arp_announce = 2 # net.core.rmem_max=16777216 net.core.wmem_max=16777216 net.ipv4.tcp_rmem=4096 87380 16777216 net.ipv4.tcp_wmem=4096 16384 16777216 net.core.somaxconn=4096 net.core.netdev_max_backlog=16384 net.ipv4.tcp_max_syn_backlog=8192 net.ipv4.tcp_syncookies=1 net.ipv4.ip_local_port_range=1024 65535 net.ipv4.tcp_tw_recycle=1 net.ipv4.tcp_congestion_control=cubic #************************************ net.ipv4.tcp_abort_on_overflow = 1 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.tcp_sack = 1 net.ipv4.tcp_window_scaling = 1 net.ipv4.tcp_mem = 94500000 915000000 927000000 net.core.optmem_max = 81920 net.core.wmem_default = 8388608 net.core.rmem_default = 8388608 net.ipv4.tcp_max_orphans = 327680 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_synack_retries = 1 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_fin_timeout = 15 net.netfilter.nf_conntrack_tcp_timeout_established = 180 net.netfilter.nf_conntrack_max = 1048576 net.nf_conntrack_max = 1048576 net.ipv4.tcp_keepalive_time = 30