option optimize_for = SPEED;
message ScanRow {
repeated bytes row = 1;
}
message ScanResult {
repeated ScanRow row = 1;
}
message ScanRequest {
int32 numOfColumns = 1;
int32 sizeOfEachColumn = 2;
int64 numOfRows = 3;
int32 batchSize = 4;
}
service ScanService {
rpc Scan (ScanRequest) returns (stream ScanResult) {}
}option optimize_for = SPEED;
message ColumnValues {
bytes columnName = 1;
bytes columnValue = 2;
}
message ScanRow {
int64 rowId = 1;
int64 timeStamp = 2;
repeated ColumnValues columnValue = 3;
}
message ScanResult {
repeated ScanRow row = 1;
}
message ScanRequest {
int32 numOfColumns = 1;
int32 sizeOfEachColumn = 2;
int64 numOfRows = 3;
int32 batchSize = 4;
}
service ScanService {
rpc Scan (ScanRequest) returns (stream ScanResult) {}
}
Now I get around 130-135 MegaBytes/Seconds Speed.
Why it is slow with kind of multi-level proto files. Is there any Serialization/De-Serialization overhead with this ?
Thanks
Avinash
>>> Now I get around 130-135 MegaBytes/Seconds Speed.
This result is on the Same Machine. i.e. gRPC Client and gRPC Servers are running on the same machine.
--To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/cc74ecdf-3eac-4475-bad0-23fd66ee03b2%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
Num Of Rows -> 2000000
Time -> 68.468212235 Seconds
Total Data Size -> 65536000000
Data Rate -> 912.8323635132227 MBps
Num Of Rows -> 2000000
Time -> 358.549532039 Seconds
Total Data Size -> 81952000000
Data Rate -> 217.97546228982097 MBps
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
| asyncStub.formatedScan(ScanRequest.newBuilder()..., new StreamObserver() { ... public void onValue( ScanFormattedResponse response) { .... do stuff with response. i.e. replace the while loop in your code } }); | |
| .setNumOfColumns(NUMBER_OF_COLUMNS) | |
| .setNumOfRows(NUM_OF_ROWS) | |
| .setSizeOfEachColumn(SIZE_OF_EACH_COLUMN) | |
| .build()); |
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/76dcf498-35e2-4e5a-ab50-92e708cdb808%40googlegroups.com.
Num Of Rows -> 2000000
Total Data Size -> 512000000
Time -> 7.484403756 Seconds
Data Rate -> 65.20225470316008 MBps
Time -> 5.776407626 Seconds
Data Rate -> 84.48157256137519 MBps
Time -> 6.010102214 Seconds
Data Rate -> 81.19662239075524 MBps
Time -> 5.401799312 Seconds
Data Rate -> 90.34026845757057 MBps
Time -> 5.352594307 Seconds
Data Rate -> 91.17074300994655 MBps
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/99752304-bbb3-4a6b-8e43-225629408e76%40googlegroups.com.