Skip to content

Instantly share code, notes, and snippets.

View aagontuk's full-sized avatar

Ashfaqur Rahaman aagontuk

View GitHub Profile
@aagontuk
aagontuk / mysqlbench.sh
Last active February 2, 2021 18:23
Script for benchmarking mysql server using sysbench
#!/bin/bash
# Instructions to run the script:
#
# 1. Create a database named sbtest in your mysql database.
# 2. Change following variables according to your mysqld setup
# 3. Run the script
#
# You can find your server socket location in path/to/your/mysqld/build/directory/data/error.log file.
MYSQL_SOCKET=/mnt/storage/sajib/repos/mysql_build/mysqld.sock
@aagontuk
aagontuk / arch_resource.md
Created September 13, 2020 19:54
Resources on Computer Architecture
@aagontuk
aagontuk / mysqld_setup_bolt.md
Last active January 17, 2021 17:14
Setup mysqld for BOLT and profile collection

Setup

  • clone mysql-server repo from github
  • Download and extract appropriate boost C++ library
  • Add following lines to CMakeLists.txt file if you are building using GCC otherwise bolt won't work.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-reorder-blocks-and-partition")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-reorder-blocks-and-partition")
@aagontuk
aagontuk / postgres_bolt.md
Created February 16, 2021 15:51
BOLT with postgres

Compiling postgres

wget https://ftp.postgresql.org/pub/source/v13.2/postgresql-13.2.tar.gz
tar xzvf postgresql-13.2.tar.gz.tar.gz
cd postgresql-13.2
export LDFLAGS="-Wl,-q"
./configure --prefix=$(pwd)/install
@aagontuk
aagontuk / gcc_glibc_2_31.patch
Created February 27, 2021 11:15
Fix up libsanitizer build with master glibc
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 97eae3fc7..d50450722 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1145,8 +1145,7 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
@aagontuk
aagontuk / linux_kernel_on_kvm_guest.md
Last active November 12, 2024 13:42
Installing/Preparing a KVM guest for Linux kernel development in Debian.

Graphical Installation

Bellow instructions are for creating a kvm guest OS(Debian) on Debian. Though the examples are based on Debian it should be same for all other distro.

  • Check if your CPU support virtualization: grep -E --color=auto 'vmx|svm|0xc0f' /proc/cpuinfo

  • Check if the host kernel support KVM: grep CONFIG_KVM /boot/config-$(uname -r)