Posts

Showing posts from October, 2025

3 Types of Backups Every IT Professional Should Know

  3 Types of Backups Every IT Professional Should Know Backups are the backbone of data protection — but not all backups are created equal. Here’s a simple breakdown of the three main types 👇 🧩 1️⃣ Full Backup Takes a complete copy of all selected data. Example: Monday’s backup includes everything. ✅ Easy to restore , ❌ Takes more time and space. 🔁 2️⃣ Incremental Backup Saves only the data that changed since the last backup (full or incremental). Example: Monday → Full Tuesday → Incremental (changes since Monday) Wednesday → Incremental (changes since Tuesday) ✅ Fast & space-efficient , ❌ Slower restore (needs full + all incrementals). ⚙️ 3️⃣ Differential Backup Saves all changes made since the last full backup. Example: Monday → Full Tuesday → Differential (changes since Monday) Wednesday → Differential (changes since Monday again) ✅ Faster restore , ❌ Uses more space than incremental.

The Role of the Slash (/) in Linux

  The Role of the Slash (/) in Linux In Linux and other Unix-like systems, / is the directory separator — everything starts from the root directory / . Examples: /etc , /var , /home . Now here’s the fun part: According to the POSIX standard , Linux treats multiple consecutive slashes as a single slash — except possibly at the very beginning of a path. That means: /home //home ///home All point to the same directory . The One Special Case Some Unix variants (like older AIX or NFS systems) use // at the start of a path to indicate network namespaces or special mounts, similar to how Windows uses \\server\share . Modern Linux usually ignores this distinction.

Setup GitHub SSH Access on a Machine

Setup GitHub SSH Access on a Machine  Pre-requisite: Ensure Git is installed on the machine. Generate SSH Key: Run the following command, replacing the email with your GitHub account email: ssh-keygen -t ed25519 -C "your_email@example.com" Copy SSH Public Key: Display the public key by running: cat ~/.ssh/id_ed25519.pub Copy the entire output. Add SSH Key to GitHub Account: Log in to your GitHub account. Navigate to Settings → SSH and GPG keys. Click New SSH key , give it a recognizable title, and paste the copied public key. Save the key. Clone GitHub Repository Using SSH: Use the SSH URL format to clone your repository: git clone git@github.com:username/repository.git

What is /proc/sys/vm/drop_caches?

🔍 What is /proc/sys/vm/drop_caches ? This is a virtual kernel interface that lets you manually free up memory used by: The page cache (file data) Dentries (directory entries) Inodes (metadata for files) It’s useful when: You want to test performance without file cache interference You need to free up RAM quickly in a controlled environment You're benchmarking or tuning systems and want a clean cache state ⚠️ Why cat drop_caches gives "Permission denied" root@iamsonukushwaha:/proc/sys/vm # cat drop_caches cat : drop_caches: Permission denied Even as root, you can't read this file. Here's why: --w-------. 1 root root 0 Oct 6 15:48 drop_caches It’s write-only . There’s no read ( r ) permission — by design. The kernel doesn't expose a value here; it only accepts commands . ✅ How to properly clear caches Before you drop caches, it’s important to sync your file system to avoid data loss: sync Then, choose the appropriate optio...

Setting Up Swap on RHEL 10

  Setting Up Swap on RHEL 10 Just created a 2GB swap file on a fresh RHEL 10 system to improve memory management: fallocate -l 2G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo '/swapfile swap swap defaults 0 0' >> /etc/fstab Swap helps prevent out-of-memory issues and keeps your system stable under load — especially on minimal installs or cloud VMs with limited RAM. Here’s the verification after setup: root@iamsonukushwaha:~ # swapon --show NAME TYPE SIZE USED PRIO /swapfile file 2G 0B -2 root@iamsonukushwaha:~ # free -gh total used free shared buff/cache available Mem: 951Mi 387Mi 328Mi 6.8Mi 390Mi 564Mi Swap: 2.0Gi 0B 2.0Gi Small setup, big impact! 🚀

The Hidden I/O Bottleneck Lurking in Your Linux System

The Hidden I/O Bottleneck Lurking in Your Linux System Have you ever tuned vm.dirty_ratio ? If not, your Linux system might be quietly throttling your disk performance without you noticing. 😬 I took a look at a small RHEL 10 VM and found this: [root@iamsonukushwaha] # cat /proc/sys/vm/dirty_ratio 30 [root@iamsonukushwaha] # cat /proc/sys/vm/dirty_background_ratio 10 What does this mean? ✅ When dirty pages reach 10% of RAM, Linux starts flushing data to disk in the background . 🚨 At 30%, the kernel blocks new writes until it flushes dirty data to avoid overloading the system . On this VM with 951MiB RAM, that translates to: Background flush kicks in at about 95MiB of dirty data. A hard stop happens at around 285MiB . If you’re running a logging-heavy app or working with slow storage, expect those sudden latency spikes. ⚡ Quick tip to smooth out I/O spikes: Set dirty_ratio to 15 Set dirty_background_ratio to 5 This simple adjustment can prevent unexpected sta...