Understanding Execute Permissions in Linux

The difference between file and directory execute bits

The Execute Bit: Different Meanings for Files and Directories

In Linux, the execute permission (x) has different meanings depending on whether it’s applied to a file or a directory:

  • For files: The execute bit allows the file to be run as a program or script
  • For directories: The execute bit allows you to enter the directory (cd into it) and list its contents

The Danger of chmod -R

Using chmod -R (recursive mode) to modify execute permissions can be risky because it treats both files and directories the same way. For example:

[Read More]

How k8s CPU limits work

What happens when a pod hits 100% CPU?

Everyone knows that once a pod hits 100% of memory, it will be killed by the OOM killer. But did you know what happens with CPU?

Let’s say you have a pod limited to 100mCPU. What actually happens under the hood?

Understanding CPU Limits in Kubernetes

As per official documentation:

cpu limits are enforced by CPU throttling. When a container approaches its cpu limit, the kernel will restrict access to the CPU corresponding to the container’s limit. Thus, a cpu limit is a hard limit the kernel enforces. Containers may not use more CPU than is specified in their cpu limit.

[Read More]