Closed fgy4010 closed 3 years ago
For questions or troubleshooting, please see the protobuf mailing list: https://groups.google.com/forum/#!forum/protobuf or Stack Overflow https://stackoverflow.com/questions/tagged/protocol-buffers
We don't formally monitor stack overflow, but there are a lot of experienced developers there who also use protobuf.
I'm doing a performance test between protocol buffers and json deserialization, but i find the performance of protocol buffers out of my expectation. I wonder if my http request is too complicated or protocol buffers is just not appropriate in my case. Here's my http request:
Here's my proto file:
And i use protocol buffers parseFrom() method to deserialize the request:
Then i use json tools to deserialize the request:
And i use jmeter to test these two methods. The test consists of one thread and 100 threads. One request message is about 3KB. Json ProtoBuf(PB) deserialize message are tested in 1024MB heap size. Before each execution, i always add a random number to make the message different from each other. My machine is 2C4G.
From the test, i can't tell the protocol buffers' improvement which consume much more memory with just 50/s TPS increasing against json.Could anyone explain this for me? Or Did anyone who do some kinda stuff like this test?