Posts

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...

I’ve donated blood!

I’m excited to share that I’ve donated blood! 🩸 The Power of Giving: My Blood Donation Experience Giving back to the community is important, and one of the simplest ways to do this is by donating blood. Recently, I donated blood, and I want to share my experience and why it matters. Why Donate Blood? Every two seconds, someone needs blood. It could be a person in an accident, someone having surgery, or a patient with cancer. The need for blood is always high, but sometimes there isn’t enough. When you donate blood, you help make sure that hospitals have enough for those who need it. One pint of blood can save up to three lives. This simple act can truly make a big difference in someone’s life. The Donation Process If you’ve never donated blood, the process is simple and quick. First, you register and answer a few health questions. Then, the nurse or doctor will clean your arm, put in a needle to collect the blood, and you’re done in about 10 minutes. Afterw...

Wipro: Top Contributor for Cost Savings

Top Contributor for Cost Savings Sonu Kumar Kushwaha currently holds the role of a Linux System Administrator at Wipro. In January 2025: Awarded the "Top Contributor for Cost Savings" certificate for EDOH FY 2024-25.

GitHub Foundations

Sonu Kumar Kushwaha is now GitHub Foundations Certified! 🎉

cool projects

Image
Sonu Kumar Kushwaha has created several impressive projects, showcasing his creativity and technical prowess.