存算分离冷查询性能咨询

Viewed 4
                SegmentIterator:
                   - FileCache: 0ns
                     - BytesScannedFromCache: 7.06 MB
                     - BytesScannedFromPeer: 0.00 
                     - BytesScannedFromRemote: 7.80 MB
                     - BytesWriteIntoCache: 256.00 MB
                     - CacheGetOrSetTimer: 5.5ms
                     - GetTimer: 1.463ms
                     - InvertedIndexBytesScannedFromCache: 0.00 
                     - InvertedIndexBytesScannedFromPeer: 0.00 
                     - InvertedIndexBytesScannedFromRemote: 0.00 
                     - InvertedIndexIOTimer: 0ns
                     - InvertedIndexLocalIOUseTimer: 0ns
                     - InvertedIndexNumLocalIOTotal: 0
                     - InvertedIndexNumPeerIOTotal: 0
                     - InvertedIndexNumRemoteIOTotal: 0
                     - InvertedIndexPeerIOUseTimer: 0ns
                     - InvertedIndexRemoteIOUseTimer: 0ns
                     - LocalIOUseTimer: 8.644ms
                     - LockWaitTimer: 107.59us
                     - NumLocalIOTotal: 206
                     - NumPeerIOTotal: 0
                     - NumRemoteIOTotal: 243
                     - NumSkipCacheIOTotal: 0
                     - PeerIOUseTimer: 0ns
                     - ReadCacheFileDirectlyTimer: 0ns
                     - RemoteIOUseTimer: 20sec903ms
                     - SetTimer: 1.752ms
                     - WaitOtherDownloaderTimer: 0ns
                     - WriteCacheIOUseTimer: 283.851ms

如上Profile, 笔者发现只要查询中BytesScannedFromRemote大于0,查询便会非常慢,笔者的FileCache用的是云磁盘,S3存储用的是云上对象存储,请求时延都在毫秒级,且S3存储的带宽上限非常大(实际带宽利用率不到10%) , 但是表现出来的性能和FileCache差异在1000倍以上, 7MB云磁盘FileCache上的数据8毫秒读完,7MB S3上的数据花了20秒读完, 这个差异和预期相差太远了
社区大佬能帮分析下可能的原因吗,如果差异真的这么大, 那感觉远端S3存储的性能几乎不可用了
另外笔者让云上S3存储的同学看了日志, 单次请求的耗时基本上都在50毫秒左右,S3本身的性能应该是没有问题的

0 Answers