Pin a process to CPU cores

Pin a running process to CPU cores 0 and 1.

taskset -cp 0,1 <pid>

tool
linux133 commands
tags
linuxperformance

More linux commands

  • watch -n1 'cat /proc/interrupts | head -30'

    Show interrupt counts per CPU, updated every second.

  • cat /proc/<pid>/limits

    Show hard and soft resource limits of a running process.

  • ulimit -n 1048576 && echo '* soft nofile 1048576 * hard nofile 1048576' >> /etc/security/limits.conf

    Set a high FD limit for the current session and save it in limits.conf for future logins.

  • df -i

    Show inode usage per filesystem. Important when you have lots of small files.

  • find / -type f -size +100M 2>/dev/null | sort

    Find files larger than 100MB on the whole filesystem.

all 133 linux commands