Tuning Linux for ClickHouse Performance

Tuning the Linux kernel can significantly improve the performance of ClickHouse, a popular open-source columnar database management system. Here are some of the Linux kernel parameters that can be tuned to optimize ClickHouse performance: To disable THP, add the following lines to /etc/rc.local file or equivalent: echo never > /sys/kernel/mm/transparent_hugepage/enabledecho never > /sys/kernel/mm/transparent_hugepage/defrag Add the […]

Python script to monitor Linux Disk I/O matrix and save information in ClickHouse

Python script to monitor Linux Disk I/O matrix and save information in ClickHouse  Here is a sample Python script that monitors the disk I/O usage of Linux and saves the information in a ClickHouse database: import psutil import mysql.connector # Connect to the ClickHouse database cnx = mysql.connector.connect(user='<username>’, password='<password>’, host='<hostname>’, port='<port>’, database='<database>’) cursor = cnx.cursor() […]

Python script to monitor Linux Process Memory matrix and save information in ClickHouse

Python script to monitor Linux Process Memory matrix and save information in ClickHouse database Here is a sample Python script that monitors the memory usage of Linux processes and saves the information in a ClickHouse database: import psutil import mysql.connector # Connect to the ClickHouse database cnx = mysql.connector.connect(user='<username>’, password='<password>’, host='<hostname>’, port='<port>’, database='<database>’) cursor = […]