You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/08/19 01:33:08 UTC
[GitHub] [rocketmq] LvChenhui commented on issue #1372: transientStorePoolEnable开启后rt变高
LvChenhui commented on issue #1372: transientStorePoolEnable开启后rt变高
URL: https://github.com/apache/rocketmq/issues/1372#issuecomment-522380573
我也有相同问题,经过定位发现是代码中同步slave花费了大量时间
日志:
WARN GroupTransferService - transfer messsage to slave timeout,
定位时发现在HAService#run中selector.select(1000)花费了大量时间,大概200ms
```
public void run() {
log.info(this.getServiceName() + " service started");
while (!this.isStopped()) {
try {
if (this.connectMaster()) {
if (this.isTimeToReportOffset()) {
boolean result = this.reportSlaveMaxOffset(this.currentReportedOffset);
if (!result) {
this.closeMaster();
}
}
this.selector.select(1000);
boolean ok = this.processReadEvent();
if (!ok) {
this.closeMaster();
}
if (!reportSlaveMaxOffsetPlus()) {
continue;
}
long interval =
HAService.this.getDefaultMessageStore().getSystemClock().now()
- this.lastWriteTimestamp;
if (interval > HAService.this.getDefaultMessageStore().getMessageStoreConfig()
.getHaHousekeepingInterval()) {
log.warn("HAClient, housekeeping, found this connection[" + this.masterAddress
+ "] expired, " + interval);
this.closeMaster();
log.warn("HAClient, master not response some time, so close connection");
}
} else {
this.waitForRunning(1000 * 5);
}
} catch (Exception e) {
log.warn(this.getServiceName() + " service has exception. ", e);
this.waitForRunning(1000 * 5);
}
}
log.info(this.getServiceName() + " service end");
}
```
我怀疑是系统内核参数问题,收集了开启和关闭transientStorePoolEnable时的状态
transientStorePoolEnable = true
```
11时18分25秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时18分26秒 0.00 4068.00 8647.00 0.00 7156.00 0.00 0.00 0.00 0.00
11时18分26秒 proc/s cswch/s
11时18分27秒 19.00 22479.00
11时18分26秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时18分27秒 0.00 3420.00 64673.00 0.00 45164.00 0.00 0.00 0.00 0.00
11时18分27秒 proc/s cswch/s
11时18分28秒 12.00 23995.00
11时18分27秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时18分28秒 0.00 3048.00 6196.00 0.00 6812.00 0.00 0.00 0.00 0.00
11时18分28秒 proc/s cswch/s
11时18分29秒 12.00 21797.00
```
transientStorePoolEnable = false
```
11时23分40秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时23分41秒 0.00 66632.00 8795.00 0.00 7296.00 0.00 0.00 0.00 0.00
11时23分41秒 proc/s cswch/s
11时23分42秒 12.00 916262.00
11时23分41秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时23分42秒 0.00 84568.00 9073.00 0.00 7501.00 0.00 0.00 0.00 0.00
11时23分42秒 proc/s cswch/s
11时23分43秒 19.00 769002.00
11时23分42秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时23分43秒 0.00 53676.00 48456.00 0.00 45444.00 0.00 0.00 0.00 0.00
11时23分43秒 proc/s cswch/s
11时23分44秒 15.00 760400.00
11时23分43秒 pgpgin/s pgpgout/s fault/s majflt/s pgfree/s pgscank/s pgscand/s pgsteal/s %vmeff
11时23分44秒 0.00 74184.00 8369.00 0.00 9110.00 0.00 0.00 0.00 0.00
11时23分44秒 proc/s cswch/s
11时23分45秒 12.00 861319.00
```
希望能解答我的问题
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services