clip-as-service icon indicating copy to clipboard operation
clip-as-service copied to clipboard

CPU seems to be bottleneck, as opposed to GPU

Open Atrus619 opened this issue 5 years ago • 6 comments

Prerequisites

Please fill in by replacing [ ] with [x].

System information Ubuntu 18.04.4 Python 3.7.3 Tensorflow 1.15.0 GPU RTX2080 TI CPU i9-9900K (8 cores / 16 threads) RAM 64GB DDR4 CUDA 10.2 Driver Version 440.59

Some of this information can be collected via this script.

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 18.04.4
  • TensorFlow installed from (source or binary): Don't remember
  • TensorFlow version: 1.15.0
  • Python version: 3.7.3
  • bert-as-service version: 1.10.0
  • GPU model and memory: RTX 2080 Ti 11GB
  • CPU model and memory: i9 9900K 64GB DDR4 RAM

Description

Please replace YOUR_SERVER_ARGS and YOUR_CLIENT_ARGS accordingly. You can also write your own description for reproducing the issue.

I'm using this command to start the server:

bert-serving-start -model_dir downloads/uncased_L-24_H-1024_A-16/ -num_worker=1 -max_batch_size 1024 -max_seq_len 8 -prefetch_size 512

and calling the server via:

bc = BertClient(ignore_all_checks=True)
bc.encode(list_of_strings)

Then this issue shows up: I am gathering about 8000 strings of length 8 ngrams and sending them to bert-serving server. I would expect the GPU utilization to increase and for the 8000 strings to be processed in a few seconds. Instead, my CPU utilization is capped out, and GPU utillization is practically 0, and it takes a few minutes to process. If I change the settings to run on my CPU, it takes significantly longer than this, so I am confident I am running on my GPU (also the server indicates it is running on my GPU). Am I doing something grossly wrong here? Thanks in advance! ...

Atrus619 avatar Feb 18 '20 00:02 Atrus619

same issue on my server. I am using a ubuntu server with 4 gpus, and the tensorflow version is 1.15. My CPU utilization is capped out, and GPU utillization is practically 0.

muziyongshixin avatar May 08 '20 16:05 muziyongshixin

Same here for me, it runs on GPU, but CPU is capped out with minor memory consumption on GPU(~150MB). Have you got any hints?

Lawliet-L avatar Jul 02 '20 15:07 Lawliet-L

Same same same, it runs on GPU, but CPU is capped out with minor memory consumption on GPU(~97MB).

Ritali avatar Sep 09 '20 10:09 Ritali

same problem with me,so how do you guys solve it?

AdamCuiYH avatar Sep 18 '20 03:09 AdamCuiYH

same problem with me. Did anybody find the solution?

aishwaryaanegundi avatar Nov 09 '20 23:11 aishwaryaanegundi

same problem with me. Did anybody find the solution?

MironenkoSergey avatar Mar 22 '21 06:03 MironenkoSergey