Bài đăng

Đang hiển thị bài đăng từ Tháng 8, 2019

ActiveMQ 5.x

Hình ảnh
- How does ActiveMQ work ?   ActiveMQ sends message between client application -  producers   Consumers sẽ là recived and process massage. The ActiveMQ broker router each message throught one of two type of destinations:         - a queue : point-to-point         - topic : publish/subscribe - Memory and Storage    A.  Memory      ActiveMQ uses memory to store messages awaiting dispatch to consumers.      ActiveMQ also writes messages to disk , in either a message store (where persistent messages go), or a temp store (where non-persistent messages go when the broker runs out of memory to store them).     Có 2 cách thức gửi message : persistent và non-persistent             non-persistent : Each non-persistent message is stored in memory as it arrives. When the available memory is full, all messages in memory are moved to th...

Linux sysctl Tuning

Hình ảnh
TCP Buffer Sizes # Settings for 1Gb network (16Mb buffer) net.core.rmem_max = 16777216 net.core.wmem_max = 16777216 net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 16384 16777216 # Settings for 10Gb network (32Mb buffer) net.core.rmem_max = 33554432 net.core.wmem_max = 33554432 net.ipv4.tcp_rmem = 4096 87380 33554432 net.ipv4.tcp_wmem = 4096 16384 33554432 # Settings for 10Gb network (54Mb buffer) net.core.rmem_max = 56623104 net.core.wmem_max = 56623104 net.ipv4.tcp_rmem = 4096 87380 56623104 net.ipv4.tcp_wmem = 4096 16384 56623104 Max size (bytes) of the TCP receive buffer as settable with setsockopt. Max size (bytes) of the TCP send buffer as settable with setsockopt. Auto-tuning limits (bytes) for TCP receive buffer: min, default, and max number of bytes. Auto-tuning limits (bytes) for TCP send buffer: min, default, and max number of bytes Queue Sizes While a socket is listen...

Tunning PHP-FPM

Hình ảnh
- Tunning PHP-FPM       + PHP-FPM can listen on multiple sockets. I also listen on Unix sockets, or TCP sockets. - Unix socket : sử trong trong trường hợp các process kết nối với nhau trên cùng một máy, dẫn đến tốc đô  nhanh.    Listening sockets live in the filesystem hierarchy and access to them can be  controlled by filesystem permissions.             - TCP socket Các process có thể kết nối thông qua network. sẽ có tốc độ chậm hơn so với unix socket.  A connected TCP socket is identified by the combination of local IP, local port, remote IP                   and remote port. A listening TCP socket is identified by local port and possibly local IP.    + How the process manager will control the number of child processes           Tùy vào cấu hình sẽ ảnh hưởng tới RAM and CPU.       - static :   ...