# NVIDIA Quadro P5000 encoding in linux working on GPU but also using CPU

**URL:** https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585
**Category:** Wowza Streaming Engine
**Tags:** transcoder
**Created:** [June 27, 2019, 9:35am UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585 "2019-06-27T09:35:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Aleksandar\_Stojcevsk](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Aleksandar\_Stojcevsk](https://community.wowza.com/u/Aleksandar_Stojcevsk)
#### Post date: [June 27, 2019, 9:35am UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585/1 "2019-06-27T09:35:21Z")

</div>

Hi,

I have NVIDIA Quadro K5000 running on Ubuntu Server 18.04.

Transcoder is configured to encode 3 bitrates 1080p, 720p and 320p using “NVENC”.

With “nvidia-smi” command i can see Wowza running process on GPU, so the GPU is transcoding but also the CPU is increase up (around 90% with 8 incoming streams).

When i change the transcoder to use “Default” encoding instead “NVENC”, “nvidia-smi” command showing GPU does not use the any Wowza process, so transcoding using just CPU (95% with 2 incoming streams).

Any solutions?

---

<div class="post-metadata">

### Author: ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)
#### Post date: [June 27, 2019, 12:32pm UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585/2 "2019-06-27T12:32:19Z")

</div>

Dependent on your CPU, it may be that it simply is running at max capacity even with all the right settings. You can compare your configuration against [https://www.wowza.com/docs/wowza-transcoder-performance-benchmark](https://www.wowza.com/docs/wowza-transcoder-performance-benchmark).

There are 3 places where you can decide to use CPU or GPU:

- Decoding (in the template XML under Root/Decode/Video/Implementation)

- Each encoding profile (Root/Encodes/Encode/Video/Implementation)

- Scaling (Root/Scale/Implementation)

Also, make sure the K5000 supports the codec that you want to de-/encode (see [https://developer.nvidia.com/video-encode-decode-gpu-support-matrix](https://developer.nvidia.com/video-encode-decode-gpu-support-matrix))

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)
#### Post date: [June 27, 2019, 3:11pm UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585/3 "2019-06-27T15:11:52Z")

</div>

Please run the following command which will show everything that your Nvidia cards are doing.  
nvidia-smi -i 0 -q

You should see a section that looks as follows:

```auto
    Utilization
        Gpu : 46 %
        Memory : 27 %
        Encoder : 0 %
        Decoder : 0 %
    Encoder Stats
        Active Sessions : 0

```

It is likely that your decoder and/or encoder is overloaded.

---

<div class="post-metadata">

### Author: ![Aleksandar\_Stojcevsk](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Aleksandar\_Stojcevsk](https://community.wowza.com/u/Aleksandar_Stojcevsk)
#### Post date: [June 28, 2019, 7:43am UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585/4 "2019-06-28T07:43:43Z")

</div>

Thank you for reply,

I change value in XML file to “NVENC” instead “default”.  
Now CPU usage is better than before, now Wowza transcoding 20 rdp streams to 3 bitrates (1080p, 720p, 360p),  
My machine CPU: Intel® Core™ i7-8700K CPU @ 3.70GHz, CPU usage: 80%.

RAM: 16GB

GPU usage: 1855MiB / 16275MiB

How many streams i can transcode with this machine?

Are this configuration is correct because GPU is used only 1855MiB/16275MiB ?

---

<div class="post-metadata">

### Author: ![Aleksandar\_Stojcevsk](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Aleksandar\_Stojcevsk](https://community.wowza.com/u/Aleksandar_Stojcevsk)
#### Post date: [June 28, 2019, 7:46am UTC](https://community.wowza.com/t/nvidia-quadro-p5000-encoding-in-linux-working-on-gpu-but-also-using-cpu/53585/5 "2019-06-28T07:46:22Z")

</div>

Thank you for replay,

I run this command, following results are from this command:

```auto
GPU command:nvidia-smi -i 0 -q

 
    FB Memory Usage
        Total : 16275 MiB
        Used : 1849 MiB
        Free : 14426 MiB

    Utilization
        Gpu : 64 %
        Memory : 4 %
        Encoder : 22 %
        Decoder : 41 %

```

Wowza transcoding 20 RDP input streams to 3 bitrates ( 1080p, 720p, 360p ).

On this machine CPU is : “Intel® Core™ i7-8700K CPU @ 3.70GHz” CPU usage on is: 80%
