说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

elasticsearch jdbc 线程数飙升,怎么控制

编辑:说三道四文库 发布时间:2018-07-18 02:22
HTML文档下载 WORD文档下载 PDF文档下载
使用 elasticsearch jdbc  同步mysql 数据库,运行几个小时后,我的索引数量和数据都不大,线程数飙升到2000多,怎么控制线程数?
Name:   java
State:  S (sleeping)
Tgid:   6715
Pid:    6715
PPid:   6713
TracerPid:      0
Uid:    501     501     501     501
Gid:    502     502     502     502
Utrace: 0
FDSize: 256
Groups: 502
VmPeak:  9639972 kB
VmSize:  9639972 kB
VmLck:         0 kB
VmHWM:   1334636 kB
VmRSS:   1274988 kB
VmData:  9488612 kB
VmStk:        88 kB
VmExe:         4 kB
VmLib:     16212 kB
VmPTE:      6376 kB
VmSwap:        0 kB
Threads:        1858
SigQ:   2/31008
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 2000000181005ccf
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: ffffffffffffffff
Cpus_allowed:   ff
Cpus_allowed_list:      0-7
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list:      0
voluntary_ctxt_switches:        1
nonvoluntary_ctxt_switches:     3
使用完毕时候要释放连接,尤其是数据库连接,可以使用c3p0之类的连接池
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘