I use this lib to test, get and set 10000 objects consume about 4-5s, when I run it in 10 threads, every thread consumed about 40-50s, how can I benefit from multi-thread by using this lib?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is kind of a vague question but if you don't have more than 1 core and you're only testing against a single memcached server then you may see worse performance because there isn't a distributed load. Furthermore, if the server you're running against is on the same machine that you're running the tests then everything may run slower because the two programs will compete for CPU time.
Ultimately, without seeing your program this is a very vague question.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use this lib to test, get and set 10000 objects consume about 4-5s, when I run it in 10 threads, every thread consumed about 40-50s, how can I benefit from multi-thread by using this lib?
This is kind of a vague question but if you don't have more than 1 core and you're only testing against a single memcached server then you may see worse performance because there isn't a distributed load. Furthermore, if the server you're running against is on the same machine that you're running the tests then everything may run slower because the two programs will compete for CPU time.
Ultimately, without seeing your program this is a very vague question.