elpadre
-
Posts
8 -
Joined
-
Last visited
-
Days Won
2
Posts posted by elpadre
-
-
Hi,
Cpu is important, but there are no huge differences. The bottleneck will be the hdd speed, if you have a lot of traffic it is worth using a multi server.
I would choose the cheaper amd cpu to start with, then you switch in the future when you reach a higher traffic.
- 1
-
Hi,
Raid 0 is the worst choice, because if one of the disks is faulty, the entire array is lost. (min 2 disk)
Raid 1 is better in that it mirrors the contents of hdd A to hdd B. (min 2 disk)
The best choice is to use raid 10, because there the security is better and the speed is excellent. (min 4 disk)
You should know that raid does not protect against data loss, always have a backup.
- 1
-
Hi,
%iowait 20-30% very high...
Mysql is also slow because the disks are loaded. The only good solution for this is if you use ssd/nvme drives or raid 10 sata hdd arrays. If everything runs only from a sata hdd, it will slow down very quickly.
-
On 7/2/2021 at 5:44 PM, xvids said:
Yes I have Installed HestiaCP with Nginx Apache, but not PHP-FPM, because If enable PHP-FPM then some errors with .htaccess, I don't remmeber that,
maybe the issue is "Folder allows PHP execution"
Yes by run TOP Its displaying, Nginx, youtube-dl, Apache,
Yes looks normal,
Hey,
what mpm php are you using? prefork? event? worker?
-
23 hours ago, xvids said:
I have Ubuntu 20.04:
I edited some Nginx and Apache config. Now L.A 5-6 because All time background task in process,
But now Database on MariaDB is working Slow, Please suggest me some info for DB, I have seen many answer on Stackweb that convert MyIsam to Innodb,
Intel Xeon-D 2141I - 8c/ 16t - 2.2GHz/ 3GHz
Memory : 64GB
Ubuntu: 20.04
[client] port=3306 socket=/var/run/mysqld/mysqld.sock [mysqld_safe] socket=/var/run/mysqld/mysqld.sock open_files_limit=4294967295 [mysqld] user=mysql pid-file=/var/run/mysqld/mysqld.pid socket=/var/run/mysqld/mysqld.sock port=3306 basedir=/usr datadir=/var/lib/mysql tmpdir=/tmp lc-messages-dir=/usr/share/mysql log_error=/var/log/mysql/error.log symbolic-links=0 local-infile=0 skip-name-resolve skip-external-locking key_buffer_size = 1024M max_allowed_packet = 1G thread_stack = 384K table_open_cache = 512 sort_buffer_size = 11M read_buffer_size = 21M read_rnd_buffer_size = 24M myisam_sort_buffer_size = 512M myisam_block_size = 5120 myisam_data_pointer_size = 7 key_cache_block_size = 8192 key_cache_division_limit = 60 key_cache_file_hash_size = 8192 key_cache_segments = 0 thread_cache_size = 256 query_cache_size= 300M query_cache_type = 1 query_cache_limit = 256K query_cache_min_res_unit = 2k tmp_table_size= 256M max_heap_table_size= 256M #innodb_use_native_aio = 0 innodb_file_per_table max_connections=2000 max_user_connections=500 wait_timeout=10 interactive_timeout=50 long_query_time=5 !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mariadb.conf.d/
Apache config:
# Global configuration PidFile ${APACHE_PID_FILE} Timeout 40 KeepAlive On MaxKeepAliveRequests 3000 KeepAliveTimeout 5 <IfModule mpm_prefork_module> ServerLimit 256 StartServers 10 MinSpareServers 75 MaxSpareServers 256 MaxRequestWorkers 4500 MaxConnectionsPerChild 10000 </IfModule> <IfModule mpm_worker_module> ServerLimit 256 StartServers 10 MinSpareThreads 75 MaxSpareThreads 256 ThreadLimit 64 ThreadsPerChild 32 MaxRequestWorkers 4500 MaxConnectionsPerChild 10000 </IfModule> <IfModule mpm_event_module> StartServers 10 MinSpareThreads 75 MaxSpareThreads 256 ThreadLimit 64 ThreadsPerChild 32 MaxRequestWorkers 4500 MaxConnectionsPerChild 10000 </IfModule>
Nginx config:
# Server globals user www-data; worker_processes 24; worker_rlimit_nofile 65535; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; # Worker config events { worker_connections 4096; use epoll; multi_accept off; accept_mutex off; } http { # Main settings sendfile on; aio threads; directio 8m; tcp_nopush on; tcp_nodelay on; client_header_timeout 180s; client_body_timeout 180s; client_header_buffer_size 2k; client_body_buffer_size 256k; client_max_body_size 256m; large_client_header_buffers 4 8k; send_timeout 60s; keepalive_timeout 60s; keepalive_requests 20000; reset_timedout_connection on; server_tokens off; server_name_in_redirect off; server_names_hash_max_size 512; server_names_hash_bucket_size 512; charset utf-8; # FastCGI settings fastcgi_buffers 4 256k; fastcgi_buffer_size 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_connect_timeout 30s; fastcgi_read_timeout 300s; fastcgi_send_timeout 180s; fastcgi_cache_lock on; fastcgi_cache_lock_timeout 5s; fastcgi_cache_background_update on; fastcgi_cache_revalidate on; # Proxy settings proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_pass_header Set-Cookie; proxy_buffers 32 4k; proxy_connect_timeout 30s; proxy_read_timeout 300s; proxy_send_timeout 180s; # Log format log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; log_format bytes '$body_bytes_sent'; log_not_found off; access_log off; # Mime settings include /etc/nginx/mime.types; default_type application/octet-stream; # Compression gzip on; gzip_static on; gzip_vary on; gzip_comp_level 6; gzip_min_length 1024; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css text/javascript text/js text/xml application/json application/javascript application/x-javascript application/xml application/xml+rss applicatio> gzip_proxied any; gzip_disable "MSIE [1-6]\."; # Cloudflare https://www.cloudflare.com/ips set_real_ip_from 103.21.244.0/22; # SSL PCI compliance ssl_session_cache shared:SSL:20m; ssl_session_timeout 60m; ssl_buffer_size 1400; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers ssl_dhparam /etc/ssl/dhparam.pem; ssl_ecdh_curve secp384r1; ssl_session_tickets off; resolver 213.186.33.99 valid=300s ipv6=off; resolver_timeout 5s; # Error pages error_page 403 /error/404.html; error_page 404 /error/404.html; error_page 410 /error/410.html; error_page 500 501 502 503 504 505 /error/50x.html; # Proxy cache proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m; proxy_cache_key "$host$request_uri $cookie_user"; proxy_temp_path /var/cache/nginx/temp; proxy_ignore_headers Expires Cache-Control; proxy_cache_use_stale error timeout invalid_header http_502; proxy_cache_valid any 1d; # FastCGI cache fastcgi_cache_path /var/cache/nginx/micro levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=30m; fastcgi_cache_key "$scheme$request_method$host$request_uri"; fastcgi_cache_methods GET HEAD; fastcgi_cache_use_stale updating error timeout invalid_header http_500 http_503; fastcgi_ignore_headers Cache-Control Expires Set-Cookie; add_header X-FastCGI-Cache $upstream_cache_status; # Cache bypass map $http_cookie $no_cache { default 0; ~SESS 1; ~wordpress_logged_in 1; ~*remote_control.php 1; } # File cache (static assets) open_file_cache max=10000 inactive=30s; open_file_cache_valid 60s; open_file_cache_min_uses 2; open_file_cache_errors off; # Wildcard include include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/domains/*.conf; }
I think you overconfig sql...Sent pm
-
13 hours ago, xvids said:
Memcache memory Increased to 2GB, Now??
I think 64 mb memcached memory very small, incrase minumum 2-4 Gb.
My tube using kvs on centos/apache fpm dialy unique 25k/ total 100k and MemCache load: 975 Mb / 4 Gb (23%)). LA peak 0.8 without convert.
I think you have a problem with the apache / nginx / sql settings.
Or I saw in the screenshot that you are converting thousands of movies every day, then the load goes high on any fast server.
I saw you have a separate database server, I think you should transfer the conversion there not to use it locally.
discussion and review about Software Raid 1 OR 0
in Business Discussion
Posted
raid 0 will only have good speed if there are many hdds in an array. If there are only 2 sata in raid0, it cannot handle much load. If ssd or nvme then ok.
Kvs backup can only be trusted if it was not saved to the raid0 array, since everything will be lost if the array crashes.
In the case of several 20TB+ data losses, it will not take much time to restore the movies, but the many small screen images etc...
We use many big tube kvs sites, on our own local servers in my country, believe me raid 0 is not a good solution in the long term. 2 sata hdd in raid0 cannot serve many users at the same time. For us, the backup is more important than the main server, it takes years of work, it's not a hobby but a business.
But if you're starting now, good luck. I just shared the pitfalls...