# Java cpu 300 - 400%

**URL:** <https://community.wowza.com/t/java-cpu-300-400/43956>\
**Category:** Wowza Streaming Engine\
**Created:** [September 20, 2014, 9:28am UTC](https://community.wowza.com/t/java-cpu-300-400/43956 "2014-09-20T09:28:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nontapat\_Rattakul](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nontapat\_Rattakul](https://community.wowza.com/u/Nontapat_Rattakul)\
**Post date:** [September 20, 2014, 9:28am UTC](https://community.wowza.com/t/java-cpu-300-400/43956/1 "2014-09-20T09:28:14Z")

</div>

I use Wowza 2.2.4

Core i5

8 GB Ram

CentOS

Wowza is using JAVA CPU 300 - 400%

![](http://www.uppic.org/image-A028_541CE583.jpg)

**VHost.xml**

> 8
> 
> \*
> 
> 1935
> 
> true
> 
> 16000
> 
> 16000
> 
> false
> 
> 100
> 
> cupertinostreaming,smoothstreaming,sanjosestreaming
> 
> com.wowza.wms.http.HTTPCrossdomain
> 
> \*crossdomain.xml
> 
> none
> 
> com.wowza.wms.http.HTTPClientAccessPolicy
> 
> \*clientaccesspolicy.xml
> 
> none
> 
> com.wowza.wms.http.HTTPServerVersion
> 
> \*
> 
> none
> 
> 1
> 
> \*
> 
> 8086
> 
> true
> 
> 16000
> 
> 16000
> 
> true
> 
> 100
> 
> com.wowza.wms.http.streammanager.HTTPStreamManager
> 
> streammanager\*
> 
> admin-digest
> 
> com.wowza.wms.http.HTTPServerInfoXML
> 
> serverinfo\*
> 
> admin-digest
> 
> com.wowza.wms.http.HTTPConnectionInfo
> 
> connectioninfo\*
> 
> admin-digest
> 
> com.wowza.wms.http.HTTPConnectionCountsXML
> 
> connectioncounts\*
> 
> admin-digest
> 
> com.wowza.wms.http.HTTPServerVersion
> 
> \*
> 
> none
> 
> smoothstreaming
> 
> smoothstreaming
> 
> cupertinostreaming
> 
> cupertinostreaming
> 
> sanjosestreaming
> 
> sanjosestreaming
> 
> 240
> 
> 160
> 
> 8
> 
> 100
> 
> 5
> 
> 8
> 
> 250
> 
> true
> 
> 65000
> 
> 24000
> 
> true
> 
> 100
> 
> 2000
> 
> 90000
> 
> 500
> 
> 75
> 
> true
> 
> 256000
> 
> 65000
> 
> 50
> 
> 4096
> 
> true
> 
> 65000
> 
> 65000
> 
> 50
> 
> 4096
> 
> 4
> 
> 8
> 
> 4
> 
> 4
> 
> 60000
> 
> 12000
> 
> 20000
> 
> 0
> 
> 60000
> 
> true
> 
> **setenv.sh**
> 
> > #!/bin/sh
> > 
> > \_EXECJAVA=java
> > 
> > JAVA\_OPTS=“-Xmx5000M”
> > 
> > # Uncomment to run server environment (faster), Note: will only work if server VM install, comes with JDL
> > 
> > JAVA\_OPTS=“$JAVA\_OPTS -server”
> > 
> > # Can be a better GC setting to avoid long pauses
> > 
> > #JAVA\_OPTS=“$JAVA\_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseParNewGC”
> > 
> > JAVA\_OPTS=“$JAVA\_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m”
> > 
> > # Uncomment to fix multicast crosstalk problem when streams share multicast port
> > 
> > JAVA\_OPTS=“$JAVA\_OPTS -Djava.net.preferIPv4Stack=true”
> > 
> > WMSAPP\_HOME=/usr/local/WowzaMediaServer
> > 
> > WMSCONFIG\_HOME=/usr/local/WowzaMediaServer
> > 
> > WMSCONFIG\_URL=
> > 
> > export WMSAPP\_HOME WMSCONFIG\_HOME JAVA\_OPTS \_EXECJAVA

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)\
**Post date:** [September 23, 2014, 4:28am UTC](https://community.wowza.com/t/java-cpu-300-400/43956/2 "2014-09-23T04:28:54Z")

</div>

Hi,

It is impossible from the information provide to determine why the CPU usage is high, ie. the server could just be busy.

I would double check your configuration, so tuning, based on information found here

[https://www.wowza.com/docs/how-to-do-performance-tuning#tune\_xml](https://www.wowza.com/docs/how-to-do-performance-tuning#tune_xml)

Quickly looking over the VHost you have posted the pool sizes are not correct for 8 cores.

Andrew.

---

<div class="post-metadata">

**Author:** ![Nontapat\_Rattakul](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@Nontapat\_Rattakul](https://community.wowza.com/u/Nontapat_Rattakul)\
**Post date:** [September 25, 2014, 2:18pm UTC](https://community.wowza.com/t/java-cpu-300-400/43956/3 "2014-09-25T14:18:20Z")

</div>

[total-core-count] = 1 (processor) x 4 (cores) = 4

HandlerThreadPool/PoolSize: (60x[total-core-count]) = 60x4 =240

TransportThreadPool/PoolSize: (40x[total-core-count]) = 40x4 =160

Why pool sizes are not correct?
