0

Currently, I have a streaming dedicated server, below you will be able to see server details:

HDD: 12TB HDD
RAM: 64GB
Processor: Intel® Core™ i7-6700 Quad-Core Skylake Hyper-Threading Network speed: 10GBPS unmtered
OS: Ubuntu 16.04

Also, I'm using nginx:

nginx.conf

user www-data;
worker_processes 3;
pid /run/nginx.pid;

events {
        worker_connections 2000;
        # multi_accept on;
}

http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 25;
        types_hash_max_size 2048;
        # server_tokens off;

        limit_conn_zone $binary_remote_addr zone=addr:10m;
        limit_req_zone $binary_remote_addr zone=one:10m rate=3r/s;
        limit_rate_after 3m;
        limit_rate 2m;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
        ssl_prefer_server_ciphers on;
        access_log off;

        gzip on;
        gzip_disable "msie6";


        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

But, when my dedicated server reach ~1500 simultaneous connections, every person watching a video get video spike/lags.

How can I solve this issue?

Here is my I/O Usage:

 PID  PRIO  USER        DISK READ  DISK WRITE SWAPIN IO> COMMAND

 7855 be/4 www-data     30.30 G     92.00 K  0.00 % 86.06 % nginx: worker process
 7853 be/4 www-data     33.22 G     76.00 K  0.00 % 85.12 % nginx: worker process
 7852 be/4 www-data     35.39 G     44.00 K  0.00 % 84.01 % nginx: worker process
  335 be/3 root          0.00 B    684.00 K  0.00 % 15.13 % [jbd2/dm-0-8]
  378 be/3 root         19.93 M      6.13 M  0.00 %  2.23 % systemd-journald
 7811 be/4 root          0.00 B      0.00 B  0.00 %  0.57 % [kworker/u16:0-ixgbe]
  674 be/0 root        340.00 K      0.00 B  0.00 %  0.44 % [loop1]
 7812 be/4 root          0.00 B      0.00 B  0.00 %  0.29 % [kworker/u16:2-events_unbound]
 5471 be/4 root          0.00 B     24.00 K  0.00 %  0.14 % [kworker/3:3-events_long]
 5550 be/4 root          0.00 B     24.00 K  0.00 %  0.13 % [kworker/5:3-events_long]
 5513 be/4 root          0.00 B     24.00 K  0.00 %  0.12 % [kworker/0:1-events_long]
   67 be/4 root          0.00 B      0.00 B  0.00 %  0.11 % [kcompactd0]
 7061 be/4 root          4.00 K      0.00 B  0.00 %  0.07 % [kworker/u16:3-events_unbound]
  866 be/4 syslog        0.00 B    128.00 K  0.00 %  0.04 % rsyslogd -n
 7937 be/4 root          0.00 B      0.00 B  0.00 %  0.06 % [kworker/u16:1-events_unbound]
  940 be/4 root         26.00 K      0.00 B  0.00 %  0.02 % snapd
 5569 be/0 root          0.00 B     12.00 K  0.00 %  0.00 % atop -R -w /var/log/atop/atop_20190413 600
 8059 be/4 root          0.00 B      4.00 K  0.00 %  0.00 % sshd: root [priv]

As I can see, the problem is related to I/O usage, how can I reduce this usage and boost up my server performance?

Thank you

  • 2
    Get faster storage. – Michael Hampton Apr 13 at 22:10
  • You have insufficient information to prove anything. Please edit your question to add network utilization (iftop or nload) CPU utilization (vmstat 5) and memory utilization (cat /proc/meminfo). Ideally, try something like my-netdata.io and look at the alerts and graphs it generates. – John Mahowald Apr 14 at 1:05
0

With about output, yeah I/O is the bottleneck, for any streaming applications you need better disk throughput, please use SSD with proper block size based on type/size of file you are going to serve. I would suggest to do disk benchmarking of your disk for that you can use third party too or dd command in linux or some other tools too. Best of luck. Hope it will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.