# Java with 100% CPU

**URL:** https://community.wowza.com/t/java-with-100-cpu/41022
**Category:** Wowza Streaming Engine
**Created:** [August 13, 2013, 1:39pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022 "2013-08-13T13:39:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kalil\_Souto\_Costa](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@Kalil\_Souto\_Costa](https://community.wowza.com/u/Kalil_Souto_Costa)
#### Post date: [August 13, 2013, 1:39pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022/1 "2013-08-13T13:39:32Z")

</div>

Hi Guys,

I’m new in this Wowza World.

So, I already need help :/… I’m using EC2 with Ubuntu and Wowza Server Trial License and it’s strange but the ‘java’ process is 95%-100% all the time.

When I use transcoder 160p and 360p the streaming keep freezing and play freezing and play.

Logs

T_asks: 64 total, 1 running, 63 sleeping, 0 stopped, 0 zombie_

_Cpu(s): 95.0%us, 4.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st_

_Mem: 3840468k total, 502300k used, 3338168k free, 10492k buffers_

_Swap: 0k total, 0k used, 0k free, 97428k cached_

_PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND_

_1644 root 20 0 2311m 284m 14m S 99.5 7.6 0:27.13 java_

_976 ubuntu 20 0 73540 1676 876 S 0.3 0.0 0:00.15 sshd_

_1655 root 20 0 17324 1228 940 R 0.3 0.0 0:00.08 top_

Someone know what could be ?

Thanks

Kalz

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 13, 2013, 10:24pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022/2 "2013-08-13T22:24:00Z")

</div>

Kalz,

What instance type?

Have you tuned it?

[https://www.wowza.com/docs/general-tuning](https://www.wowza.com/docs/general-tuning)

Did you know about the pre-built AMIs here:

[https://www.wowza.com/docs/pre-built-amis-amazon-machine-images](https://www.wowza.com/docs/pre-built-amis-amazon-machine-images)

These are pre-tuned.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 14, 2013, 9:13am UTC](https://community.wowza.com/t/java-with-100-cpu/41022/3 "2013-08-14T09:13:21Z")

</div>

Kalz,

Yes, you can use the Trial license on a licKey AMI. The Transcoder needs as much as you can give it. Take a look at the [Transcoder Benchmarks](https://www.wowza.com/docs/wowza-transcoder-performance-benchmark) for reference.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 15, 2013, 3:08pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022/4 "2013-08-15T15:08:35Z")

</div>

What instance type are you using? Only the m1.medium has 3.7g ram, and that has 1 core. It’s not adequate for much transcoding. I would suggest, at minimum, using an m1.xlarge.

For larger instance types, you should apply tuning steps from step #9 of the [Tuning Guide](https://www.wowza.com/docs/how-to-do-performance-tuning), which is not automated at present (it is a backlog item).

Richard

---

<div class="post-metadata">

### Author: ![Kalil\_Souto\_Costa](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@Kalil\_Souto\_Costa](https://community.wowza.com/u/Kalil_Souto_Costa)
#### Post date: [August 13, 2013, 6:33pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022/5 "2013-08-13T18:33:20Z")

</div>

Thanks man,

So, I use the medium instace - on demand. I have used pre-built DevPay, but I need to test the transcoder addon.

Could I use the trial license key in pre-built AMI LicKey ? What do you suggest ?

Thanks a lot

Kalz

---

<div class="post-metadata">

### Author: ![Kalil\_Souto\_Costa](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@Kalil\_Souto\_Costa](https://community.wowza.com/u/Kalil_Souto_Costa)
#### Post date: [August 14, 2013, 3:32pm UTC](https://community.wowza.com/t/java-with-100-cpu/41022/6 "2013-08-14T15:32:38Z")

</div>

Richard,

Thanks a lot.

I signed the Lickey with Amazon EC2.

The freezing never more, but look this…

Tasks: 66 total, 1 running, 65 sleeping, 0 stopped, 0 zombie

Cpu(s): 95.4%us, 4.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st

Mem: 3844592k total, 2051876k used, 1792716k free, 28768k buffers

Swap: 0k total, 0k used, 0k free, 424248k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

28423 root 20 0 4372m 1.4g 14m S 99.7 38.9 12:41.44 java

97 root 20 0 0 0 0 S 0.3 0.0 0:01.21 kworker/0:1

28863 ec2-user 20 0 106m 1756 752 S 0.3 0.0 0:00.04 sshd

Java process is 95% again…so strange.

I enable transcoder with transrate for H264 using 160p and 360p, just one camera stream.

My CPU / Mem

Intel® Xeon® CPU E5-2650 0 @ 2.00GHz

3.7GB memory

Do you suggest tuning the wowza? I think its strange for one camera in rtsp.

---

<div class="post-metadata">

### Author: ![Kalil\_Souto\_Costa](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@Kalil\_Souto\_Costa](https://community.wowza.com/u/Kalil_Souto_Costa)
#### Post date: [August 16, 2013, 8:17am UTC](https://community.wowza.com/t/java-with-100-cpu/41022/7 "2013-08-16T08:17:44Z")

</div>

Thanks Richard

I signed a large instance with High CPU, no freezes anymore.

I’ll try all of your tips.

Thanks a lot for help.

Kalz
