50 incoming live streams is high. You want a late model quad core and 8 - 16 gigs of RAM to handle that many live streams.
You could have a system that set a time only in the playlist, a start date and a number of days to schedule as Property settings in Server.xml. The scheduler source code could be a starting place for that.
Richard
Hi Richard,
ok definitely got some performance issues after switching to using the schedule with 1 application and my 50 cameras. I will suggest to the customer that we need to increase memory in the server but want to be happy that im getting the most out of it as it stands first.
My GC log is showing something like this after I have been running it for a short while :
1613.218: [GC 6478469K(7115584K), 0.0053330 secs]
1614.004: [GC 6893565K->6546377K(7115584K), 0.1047760 secs]
1614.522: [GC 6763624K(7115584K), 0.0117220 secs]
1614.915: [GC 6807490K->6456016K(7115584K), 0.1012640 secs]
1615.019: [GC 6456107K(7115584K), 0.0049330 secs]
1615.847: [GC 6875472K->6528711K(7115584K), 0.1045350 secs]
1616.349: [GC 6743596K(7115584K), 0.0119390 secs]
1616.683: [GC 6840718K(7115584K), 0.0248660 secs]
1616.779: [GC 6884961K->6540091K(7115584K), 0.1049080 secs]
1617.712: [GC 6959542K->6612229K(7115584K), 0.1019890 secs]
1618.180: [GC 6832460K(7115584K), 0.0118700 secs]
1618.608: [GC 6931897K->6585314K(7115584K), 0.1053600 secs]
1618.717: [GC 6585740K(7115584K), 0.0066470 secs]
1619.525: [GC 7004755K->6660340K(7115584K), 0.1041150 secs]
1619.647: [GC 6677397K(7115584K), 0.0154620 secs]
1620.396: [GC 6670643K(7115584K), 0.0273300 secs]
1620.510: [GC 6704915K->6362038K(7115584K), 0.1045000 secs]
1621.420: [GC 6781494K->6432038K(7115584K), 0.1019040 secs]
1621.977: [GC 6654726K(7115584K), 0.0120770 secs]
1622.374: [GC 6796902K->6875726K(7115584K), 0.1208340 secs]
1622.499: [Full GC 6875726K->6348420K(7115584K), 4.1582730 secs]
1626.677: [GC 6348497K(7115584K), 0.0036760 secs]
1626.979: [GC 6767876K->6545067K(7115584K), 0.1476160 secs]
1627.616: [Full GC 6964523K->6439201K(7115584K), 4.1906110 secs]
1632.097: [GC 6858657K->6651414K(7115584K), 0.1579980 secs]
1632.447: [GC 6938309K(7115584K), 0.0356470 secs]
Unix CPU and memory utilisation :
top - 18:12:32 up 62 days, 1:07, 2 users, load average: 1.07, 2.40, 2.13
Tasks: 148 total, 1 running, 146 sleeping, 1 stopped, 0 zombie
Cpu0 : 21.3%us, 3.5%sy, 0.0%ni, 70.3%id, 0.2%wa, 0.1%hi, 4.6%si, 0.0%st
Cpu1 : 19.0%us, 1.8%sy, 0.0%ni, 79.0%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 17.4%us, 1.5%sy, 0.0%ni, 81.0%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 15.8%us, 1.4%sy, 0.0%ni, 82.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8148636k total, 8003368k used, 145268k free, 85152k buffers
Swap: 4194296k total, 17656k used, 4176640k free, 140680k cached
So overall CPU across the processors is not too bad really, but because I have a heap setting of 7000 set it has eaten most of the server memory but I am not going into swap space so its not the end of the world I think.
It is the Full GC which seems to be causing the most issue with the stream moving but it is hard to 100% confirm that.
My server is a quad core with 8Gb memory running Centos 6.2
Following the performance tuning guide I set the following java options :
Heap space set at 7000M (I tried 5000 and 6000 as well but not a huge amount of difference, but maybe 7000 made the server last longer without having real problems).
The following options set :
JAVA_OPTS=“$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=512m” once again taken from the guide.
I also tried the default options :
JAVA_OPTS=“$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseParNewGC”
I am running the latest Java version 7 from a post you put up somewhere Richard so think I am right there? I have not tried the Experimental: Garbage-First garbage collector (G1) idea yet but do you think that may be worth me trying?
What I should also add to make this even worse is that there is barely any users on the system watching the webcams as we are still in a testing mode. So I dont really know the resources the server or java process will need when say 100-500 people are watching any one of the streams?
If you could give me some ideas then it would be appreciated!