Does your disk ever get cramped? Even after you clear out some old virtual machines? Is there still no extra disk space to work with? If you find yourself in that situation, remembering to use these commands can help: 🐧 df -h --> this will help you see which filesystem is tight. 👀 du -h --> using that on a particular path or directory will help you see which directories are the biggest. df stands for "disk free" du stands for "disk usage" For the -h flag, this comes straight from the man page: -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) In general, those commands will help you figure out how your disk is or isn't being used, but it may still take some extra work to figure out exactly why space is still cramped. I forgot that the distro I am using (#Omarchy) uses #snapper to create snapshots of my system after every update. It's nice to have those snapshots, but on a small disk I was running out of space too fast. For now I'm okay, and du and df have helped me identify ways to get more breathing room, but maybe the next step should be to just go out and finally buy a bigger hard drive... Is a 256G SSD enough? Doesn't seem like it. How much space do you like to have on your main drive? #linux
Free up disk space with df and du commands
More Relevant Posts
-
Zero-Copy IO: Avoiding Work You Don’t Need “The fastest data copy�� is the one you never do.” Typical data movement: Disk → Kernel buffer → User space → Socket 👉 Multiple memory copies happen 🧠 Zero-copy approach Using: * sendfile() * mmap() * DMA 👉 Data is passed without extra copying between buffers ⚡ Why this matters * Fewer memory copies * Lower CPU usage * Better throughput * Especially important when: * transferring large files * handling high network load 🔥 But here’s the catch Zero-copy: * reduces CPU work * but doesn’t remove IO latency 👉 Disk and network are still bottlenecks 💡 Real insight Optimizing systems is often about: 👉 removing unnecessary work * not just making work faster 🧠 One line to remember: “Zero-copy removes overhead—not the cost of IO.” #Linux #ZeroCopy #SystemDesign #OperatingSystems #Networking #ScalableSystems #Kernel
To view or add a comment, sign in
-
-
Page Cache: Why Your System Feels Fast (Until It Doesn’t) “Your disk is slow. Your system just hides it—until it can’t.” Most file reads don’t hit disk. They hit: 👉 Page Cache (RAM-backed memory managed by kernel) 🧠 What actually happens * First access → data read from disk * Stored in page cache * Subsequent reads → served from RAM 👉 Same API, very different execution path ⚡ Why this matters * Cache hit → microseconds * Cache miss → milliseconds 👉 That gap creates: * sudden latency spikes * unpredictable performance 🔥 Where systems go wrong * Memory pressure → cache eviction * Large sequential scans → wipe useful cache * Random workloads → low reuse 👉 Result: * frequent cache misses * degraded performance 💡 Real lesson If performance fluctuates: 👉 Don’t just check CPU 👉 Check memory + cache behavior 🧠 One line to remember: “Page cache turns disk latency into memory variability.” #Linux #PageCache #SystemDesign #OperatingSystems #StorageSystems #ScalableSystems
To view or add a comment, sign in
-
-
Most Linux servers run with default sysctl values. And most of the time… nobody questions it. But in real environments (especially hosting / high-load systems), this leads to: Connection drops under load High TCP retransmissions File descriptor exhaustion Unstable performance patterns So I started building something small: eak-systune A lightweight tool that: Observes real system behavior (not assumptions) Builds a rolling baseline from live metrics Detects anomalies in CPU, TCP, FD usage, run queue Compares system state against optimized sysctl profiles Generates actionable recommendations Not based on static “best practices”. Based on how your system actually behaves under load. Still early, but already seeing interesting signals: TCP pressure patterns FD usage spikes before incidents Misaligned kernel parameters This is not another tuning script. This is about understanding before optimizing. More soon.
To view or add a comment, sign in
-
𝐖𝐢𝐥𝐥 𝐚𝐝𝐝𝐢𝐧𝐠 𝐦𝐨𝐫𝐞 𝐭𝐡𝐫𝐞𝐚𝐝𝐬 𝐠𝐢𝐯𝐞 𝐦𝐞 𝐦𝐨𝐫𝐞 𝐂𝐏𝐔 𝐭𝐢𝐦𝐞 𝐟𝐨𝐫 𝐦𝐲 𝐩𝐫𝐨𝐜𝐞𝐬𝐬? On Linux, the scheduler doesn’t care how many threads you want to run — it cares about fairness and priority. If your process spawns more threads, you’re not magically getting extra CPU time. Instead, you're just splitting the same allocated time across more threads. Think of it like slicing a pizza thinner — you don’t get more pizza. So why do people use multiple threads? 👉 Concurrency ≠ Parallelism More threads help when tasks are waiting (I/O, network, disk). They help utilize multiple cores if available. They improve responsiveness, not entitlement to CPU time. 👉 Linux Scheduling Reality The Completely Fair Scheduler (CFS) distributes CPU time based on weights (nice values), not thread count. 1 thread or 100 threads — your process gets roughly the same share (assuming same priority). 👉 When more threads actually help CPU-bound + multiple cores → real parallelism I/O-bound workloads → hide latency Async alternatives may still outperform naive threading 👉 When they hurt Context switching overhead Cache thrashing Lock contention “It got slower after adding threads” (yes, it happens) 💡 The real optimization question isn’t: “How many threads should I add?” It’s: “Where is my bottleneck — CPU, I/O, or synchronization?” Because throwing threads at the problem is easy. Understanding the scheduler is what makes you dangerous. #Linux #SystemsProgramming #Performance #Multithreading #OperatingSystems
To view or add a comment, sign in
-
-
Most engineers don't know Linux can freeze a running process mid-execution and bring it back later, even on a different machine. It's called CRIU (Checkpoint/Restore In Userspace). It snapshots everything: memory pages, open file descriptors, CPU registers, even active TCP connections. Writes it all to disk. Kill the process. Restore it later and it picks up exactly where it left off. Docker's checkpoint/restore feature is built directly on top of this. Use cases: - Live migrate containers between hosts with zero downtime - Snapshot long-running jobs before risky operations - Speed up slow-starting applications by restoring from a warm checkpoint (this is how Google uses it in gVisor) The main constraint is the kernel version and architecture need to match on source and destination. Works best within homogeneous clusters. CRIU has been in the kernel since 3.11.
To view or add a comment, sign in
-
-
Here's a breakdown of the key components and processes involved 🐧 Power On! ⚡ This signifies the start of the process when the computer is powered on. 🐧 BIOS (Basic Input/Output System) & ROM (Read-Only Memory) 💻 #BIOS is a firmware program stored in the ROM chip. It performs a Power-On Self Test (POST) to check the basic functionality of the system hardware and then loads the bootloader. 🐧 Boot Loader 🔄 The bootloader is a small program that loads #Linux 🐧 kernel from the hard disk into memory. 🐧 Master Boot Record (MBR) 💾 The MBR is the first sector of the hard disk and contains the boot loader code and a partition table. 🐧 Kernel 🧠 #kernel is the core of the Linux operating system. It manages hardware resources (like memory and CPU), provides security, and allows applications to interact with the hardware. 🐧 User Space (Applications) 💼 This refers to the software programs that users interact with, such as web browsers, word processors, and games. These programs run in user space, which is isolated from the kernel for security reasons. 🐧 System Calls 📞 System calls are a way for applications in user space to request services from the kernel. For instance, if an application wants to read a file from the hard disk, it would make a system call to the kernel. 🐧 Process Management 🔄 The kernel is responsible for managing processes, which are instances of running programs. It allocates resources to processes, schedules their execution time, and handles their termination. 🐧 Memory Management 🧠 The kernel manages the system's memory, allocating and freeing memory as needed by processes. 🐧 Device Drivers 🖥️ Device drivers are software programs that allow the kernel to communicate with specific hardware devices. 🐧 File System Management 🗄️ The kernel manages the file system, which is a way of organizing and storing files on the hard disk. 🐧 Shell (or Graphical User Interface (GUI)) The shell is a command-line interface that allows users to interact with the operating system by typing commands. Alternatively, a graphical user interface (GUI) provides a more user-friendly way to interact with the system using icons, menus, and windows.
To view or add a comment, sign in
-
-
Working with high-speed DAQ systems has made performance visibility absolutely critical. One tool I strongly recommend exploring is eBPF (https://ebpf.io). eBPF is, in many ways, the modern Linux equivalent of DTrace on Solaris. It enables deep, kernel-level tracing and performance analysis without requiring kernel source modifications—which is a major advantage in production environments. The level of insight you can gain, with minimal system impact, is remarkable. Having spent over 20 years using truss on Solaris (e.g. at JET), I initially saw strace as the closest Linux alternative. However, for low-overhead, high-resolution observability, eBPF is in a completely different league. There’s also an excellent ecosystem of ready-to-use tools developed by Brendan Gregg: (https://lnkd.in/eZcQthjV). These include powerful one-liners and visualisations that make advanced tracing much more accessible. Below is an example of eBPF-based latency analysis for high-speed NVMe SSD disk writes—something that would be extremely difficult to capture with traditional tools
To view or add a comment, sign in
-
-
🚨 Your Linux server is crawling. Apps are lagging. Users are complaining. Before you panic — here's a 4-step framework I use to diagnose and fix high CPU usage fast. 👇 ⚡ Step 1: Check System Load Run uptime, top, or htop to get a bird's-eye view of CPU utilization and running processes. 🔍 Step 2: Hunt Down the Culprit Process One command does the heavy lifting: ps -eo pid,ppid,cmd,mem,%cpu --sort=-%cpu | head Instantly surfaces which process is hogging your CPU. 🧵 Step 3: Dig Deeper into the Process Got a PID? Now investigate: ps -p <PID> -f Uncover who started it, what application is running, and its parent process. 📋 Step 4: Read the Logs Logs don't lie. Check: → /var/log/messages → /var/log/syslog → journalctl -xe They reveal crashes, service failures & resource bottlenecks hiding in plain sight. ✅ 4 commands. 4 steps. One resolved incident. Bookmark this for your next on-call emergency. 🔖 💬 What's your go-to tool for CPU troubleshooting? Drop it in the comments! #Linux #SysAdmin #DevOps #CloudComputing #ServerManagement #SiteReliabilityEngineering #SRE #LinuxAdmin #PerformanceTuning #TechTips #ITOperations #Infrastructure #OpenSource #BackendDevelopment #Engineering
To view or add a comment, sign in
-
-
→ The Hidden Journey: What Really Happens When Linux Boots Ever wondered what really happens between pressing the power button and seeing your login screen? Most engineers use Linux daily, yet few truly understand its fascinating boot process. Let’s uncover the mystery behind those few seconds of magic. • Step 1 – Power On The moment you hit the power button, BIOS or UEFI wakes up from non-volatile memory and performs a POST (Power-On Self-Test) to check if your system’s hardware is healthy. • Step 2 – Hardware Detection It scans and identifies key components - CPU, RAM, and storage - to prepare them for the next stage. • Step 3 – Boot Device Selection The firmware chooses where to boot from - your hard drive, USB, or network - based on system configuration. • Step 4 – Boot Loader (GRUB) Then comes GRUB, the bootloader that decides which operating system or kernel to load. • Step 5 – Kernel Initialization Once the kernel takes control, it initializes core functions, drivers, and transitions to user space. • Step 6 – systemd Takes Over The systemd process starts as the first user-space process, handling services, mounting filesystems, and bringing your environment to life. • Step 7 – System Ready Startup scripts run, services start, and finally, you’re greeted with the login screen - your Linux system, fully alive. Every reboot hides this elegant sequence - a silent symphony of coordination and control. Follow Ashish Sahu for more insights
To view or add a comment, sign in
-
-
Hi everyone, I’ve started sharing real-time IT troubleshooting scenarios based on my 10+ years of experience as a System Administrator. In this video, I worked on a practical issue: High CPU usage in a Windows 10 Virtual Machine on VirtualBox Instead of guessing, I followed a step-by-step approach and identified the root cause — low CPU allocation in the VM. After increasing the CPU cores, the issue was resolved. This video focuses on: Real-world troubleshooting Understanding virtualization Thinking beyond just the OS Checking both VM and host system My goal is to help others learn system administration through real scenarios, not just theory. Here is the video: https://lnkd.in/g7DdHQYf Would appreciate your feedback and suggestions #SystemAdministrator #Virtualization #Windows10 #VirtualBox #ITSupport #Learning
To view or add a comment, sign in