Hello everyone
We have the following problem on our panel, when connected to a stream 600-1000 clients and when the stream restarts on backup stream the CPU from main server rises to 100%, while the CPU overload I have to perform service start so that the CPU goes down again. I have an 80core server there with 256GB RAM and is 1gbps unmetered.
We used 22F mods panel.
Can someone help me with what it could be?
From SSH client Putty, type in:
nano /etc/fstab
Main Server
Main server has no stream. Sometimes we can test some streams so we will need the size of streams folder to be very small. Why do you need to allocate 90% of RAM to streams folder when you don’t even stream anything? You can put in maybe 2G if you want. with 2G you can test a few streams with no issue. So the code will be like this for main server.
tmpfs /home/xtreamcodes/iptv_xtream_codes/streams tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=2G 0 0
LB Servers
LB servers are mostly for streams so we will need lots of RAM for it. But how much RAM is needed. It is based on your ONLINE streams and its bitrate. This is not based on your total clients connected to that server
Here is the math.
Total RAM needed = (stream bitrate(kbps)/8)*10(seconds)*10chunks
So if your stream bitrate is 7000kbps, you have to convert it to KB/s which is 7000/8=875KB/s. Now times that number to 10 seconds which is the length of the chunk, you will get 8750KB, which is around 8.7MB/chunk. Plus it stores 10 chunks per stream so it will be 87MB of RAM per stream.
Now if you want to have 100 ONLINE streams at this 7000kbps bitrate, you will need 100x87MB = 8700MB of RAM only. This is 8.7G of RAM.
If you need 1000 ONLINE streams at 7000Kbps, you need 87GB of RAM.
My current server has 256GB of RAM and by default, it allocates 90% of that (230GB) to the streams folder. However in in real usage, I only streams 800 ONLINE streams, with mixed bitrates. When view the streams folder, It only uses 64 GB of RAM. So now I just need to allocate around 80-100GB of RAM to this folder. The rest of RAM can be used by other programs.
tmpfs /home/xtreamcodes/iptv_xtream_codes/streams tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=100G 0 0
After you make the changes, you need to make it go into effect. Type in this 2 commands
umount /home/xtreamcodes/iptv_xtream_codes/streams
mount -a