OpenLiteSpeed sử dụng giao diện cài đặt trực quan. Thiết lập chủ yếu nằm ở mục Server Configuration và các tab con bên trong nó.
Mặc đinh, những thiết lập của OLS khá tốt cho mọi nhu cầu, nhưng nếu bạn muốn có hiệu năng tốt hơn, hãy điều chỉnh nó một chút để phù hợp hơn với hệ thống.
Dưới đây, mình xin đưa ra một số tinh chỉnh thông thường cho OLS. Mọi đều ở đây chỉ là mẫu, hãy chỉnh lại phù hợp với máy chủ của bạn.
Cấu hình Server:
4 x 3,4GHz Xeon Core 2GB RAM Vị trí: LA – USA
Nếu thắc mắc về chức năng của tùy chọn, hãy nhấn vào nút ? cạnh tên chức năng, thông tin về nó sẽ hiện ra (tiếng anh)
General – Tuning Hướng dẫn tối ưu cài đặt của OpenLiteSpeed - 1
Number of Workers Tùy chọn nhập: Số thật
Đây là số lượng tiến trình (Worker Process) mà OLS sẽ sử dụng. Mặc định là 1, giới hạn tối đa là 16. Mỗi tiến trình có thể sẽ sử dụng 100% của 1 CPU core để hoạt động. Bạn có thể thiết lập nó bằng tổng số core đang có trên VPS, nhưng mình vẫn khuyên là giữ trống 1 phần cho các tiến trình của PHP hay MySQL. Hoặc để yên 1 cũng được vì OLS rất nhẹ và nhanh khi xử lý HTTP Request.
Memory I/O Buffer Tùy chọn nhập: Số thật
Đây là lượng bộ nhớ tối đa dùng để chứa nội dung tạm cho các truy vấn hay các nội dung động. Một khi đã sử dụng hết lượng bộ nhớ này, OLS sẽ bắt đầu sử dụng “Swapping Directory” – Chậm hơn, IOP thấp hơn > giảm hiệu năng
Use Client IP in header Tùy chọn nhập: Chọn 1 trong các mục
Nếu đang sử dụng các loại proxy bất kì như Varnish Cache, Haproxy hay ngay cả Cloudflare hoặc các proxy Anti-DDOS thì bạn sẽ cần kích hoạt tùy chọn này để có thể lấy được IP thật của người dùng, tránh trường hợp tự block chính mình hay dải IP của Cloudflare bị block khiến mọi người không truy cập được.
Index files Tùy chọn tên file và thứ tự của Index, như Index.html, index.php, defaults.html….
Smart Keep-Alive Nếu Max Keep-Alive Requests có giá trị lớn hơn 1 (bật Keep-Alive) thì Smart Keep-Alive có thể kích hoạt, Giúp giữ kết nối (keep-alive) với các kết nối đến file CSS, JS, Ảnh, Video…. còn tắt keep-alive đổi với các kết nối đến trang html. Vì sẽ tốt hơn nếu giữ 1 kết nối keep-alive cho những file tĩnh (khá nhiều) và một kết nối không bật keep-alive cho các dữ liệu văn bản,html (chỉ có 1 file) – Tránh trường hợp để kết nối chờ cho đến khi hết Keep-Alive Timeout.
I/O Event Dispatcher Tùy hệ thống mà chọn thôi, Nếu dùng kernel trên 2.6 (dùng uname -r để biết) thì có thể chọn epoll.
Max Cached Small File Size và Total Small File Cache Size Những file tĩnh có dung lượng nhro hơn Max Cached Small File Size sẽ được lưu trữ ở memory buffer cache. Và tổng dung lượng sẽ không vược quá Total Small File Cache Size.
Còn file lớn sẽ chứa ở NMAP.
Extarnel APP Hướng dẫn tối ưu cài đặt của OpenLiteSpeed - 2
External APP > lsphp71 > Max Idle Time Giữ giá trị ở -1 hoặc để trống nếu sử dụng Opcache. Server có thể lấy lại lượng tài nguyên nếu cần thiết nên không phải quá quan tâm về việc nó sống lâu quá.
External APP > lsphp71 > Memory Soft & Hard Limit Opcache sẽ sử dụng lượng bộ nhớ được cấp tối đa cho PHP để chứa dữ liệu. Nhưng nếu PHP cần lượng bộ nhớ + bộ nhớ cho Opache lớn hơn giới hạn, thì nó sẽ gây lỗi 503/out of memory.
Nhớ chỉnh thêm ở memory_limit trong file php.ini cho phù hợp nữa
External APP > lsphp71 > Process Soft & Hard Limit Giới hạn tổng số tiến trình có thể được tạo ra khi hoạt động.
Một số giá trị tinh chỉnh mẫu Mình đưa ra một số giá trị mẫu để tham khảo. Ở phần Worker Process, sử dụng công thức [tổng số core]/2 để tính toán sử dụng.
Number of Workers: Set the number of worker processes based on the available CPU cores, considering a balance between OLS, PHP, and MySQL processes. Dave The Diver
wordle is a free daily word game that can teach you a lot of new words. It's entertaining, straightforward, and limited to one game each day, just like a crossword puzzle. There is a new word of the day that you must identify every day for the next twenty-four hours.
One of the standout features of subway surfers online is its ability to constantly update with new locations, characters, and challenges, ensuring that players always have something new to explore.
Pokemon fusion is a fan-made concept that combines two or more Pokemon to create a new, hybrid creature. Fans use online tools and software to create their own unique fusions and share them with others in the community.
Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good. tunnel rush
The plot of fnaf revolves around a security guard hired to work at a pizza restaurant called Freddy Fazbear's Pizza at night. The player must try to survive five nights working inside while avoiding attacks by bear robots and automated pizzas, which they call "animatronics". The plot later evolved and expanded through subsequent installments of the game series.
Geometry Dash Soundtrack Evolution: Witness the evolution of the Geometry Dash soundtrack. As the game updates, so does the music, providing a fresh auditory experience with each new level.
It is important to note that creating feminized seeds https://pureplantpleasures.com requires expertise and careful control of the breeding process. This method has become popular among growers as it ensures a higher success rate in producing female plants, saving time, space, and resources that would otherwise be spent on cultivating and identifying male plants.
Deletar Post
Deletar post ?
O tópico foi adicionado com sucesso à sua linha do tempo!
Comentário relatado com sucesso.
O post foi adicionado com sucesso à sua linha de tempo!
Você atingiu seu limite de amigos 5000!
Erro de tamanho de arquivo: o arquivo excede permitido o limite (5 GB) e não pode ser carregado.
Seu vídeo está sendo processado, informaremos você quando estiver pronto para ver.
Não é possível carregar um arquivo: esse tipo de arquivo não é suportado.
Detetámos algum conteúdo adulto na imagem que carregou, por isso, recusámos o seu processo de carregamento.
Compartilhar postagem em um grupo
Compartilhar para uma página
Compartilhar para o usuário
Sua postagem foi enviada. Analisaremos seu conteúdo em breve.
Para fazer upload de imagens, vídeos e arquivos de áudio, é necessário atualizar para o membro profissional. Upgrade To Pro
Editar oferta
Adicionar camada
Exclua sua camada
Tem certeza de que deseja excluir esta camada?
Rever
Para vender seu conteúdo e postagens, comece criando alguns pacotes. Monetização
Pague pela Wallet.
Adicionar pacote
Exclua seu endereço
Tem certeza de que deseja excluir este endereço?
Remova seu pacote de monetização
Tem certeza de que deseja excluir este pacote?
Cancelar subscrição
Tem certeza de que deseja cancelar a inscrição deste usuário? Lembre-se de que você não poderá visualizar nenhum conteúdo monetizado.
Alerta de pagamento
Você está prestes a comprar os itens, deseja prosseguir?