15 Ağustos 2023 Salı

rsyslog Servisi

Örnek
Şöyle yaparız
# Install
> apt list -a rsyslog

# start and enable the rsyslog service
> sudo systemctl enable --now rsyslog
Konfigürasyon Dosyası
Konfigürasyon için /etc/rsyslog.conf dosyası veya /etc/rsyslog.d/ dizininde bir dosya kullanılır

Örnek
Şöyle yaparız. Kafka'daki your_topic_name_here isimli topic'i okur
# Load the Kafka output module
module(load="omkafka")

# Forward logs to Kafka broker(s)
action(type="omkafka" topic="your_topic_name_here" broker="kafka_broker_host:port")


11 Ağustos 2023 Cuma

io_uring

Giriş
Açıklaması şöyle
You might have heard about io_uring: a new addition to the kernel which specifically targets providing a uniform asynchronous API for all kinds of I/O operations, including, first and foremost, operations on local files. 
Project Loom ve io_uring
Açıklaması şöyle. Yani JDK 21 kullanıyorsak worker thread sayısını hem JVM'de hem de işletim sisteminde ayarlamak gerekir
It can, and it probably will (probably only for local files, as io_uring's performance gains over epoll aren't consistent, and the implementation itself frequently has security vulnerabilities). However, this only shifts the problem instead of fully solving it.

From the application’s perspective, we get a non-blocking, asynchronous API for file access. But if we look at what happens under the covers in io_uring, we'll discover that it manages a thread pool for blocking operations, such as these on local files. Hence instead of running compensating threads in the JVM, we'll get threads run and managed by io_uring.

This has some configuration implications. If you’d like to set an upper bound on the number of kernel threads used by your application, you’ll now have to configure both the JVM with its carrier thread pool, as well as io_uring, to cap the maximum number of threads it starts. Luckily, there's a great article describing how to do precisely that.