I am trying to delpoy a micro image decoder server(implemented using cv2 + python3.6.9 + ray 1.13.0, only use CPU).
When I increase the “num_replicas” from 1 to 16, the RPS does not change. I wonder why
My logic cpu number is 80. The code is like below, it is simple :
@serve.deployment(num_replicas=4, ray_actor_options={"num_cpus": 1, "num_gpus": 0})
class PreprocessHandler():
def __init__(self, recognizer):
pass
def preprocess(self, im_byte):
img = cv2.imdecode(np.asarray(bytearray(im_byte), dtype='uint8'), flags=cv2.IMREAD_COLOR)
return img
async def __call__(self, request):
im_byte = await request.body()
img = self.preprocess(im_byte)
return img
deployment_graph = PreprocessHandler.bind()