Limiting CPU Usage of A Process in CentOS/RHEL 7

In HPC, we may need to protect head node from unnecessary heavy process that may cause login problem for users. One of the solutions is by using cpulimit. We can create a cronjob to monitor all processes and set certain limit for them. This is how I usually did in CentOS/RHEL 7.x.

  1. Install cpulimit package from EPEL repo.

yum install cpulimit

  1. Create a script to monitor the process. The script below is a modified version of the script in this forum. You can modify inputs of the first 3 variables: CPU_LIMIT, BLACK_PROCESSES_LIST, and WHITE_PROCESSES_LIST.

Continue reading

[ WeekendProjects ] Python and GPU

Wiken kali ini pengen nyobain gimana menggunakan python untuk gpu programming.. ga sampe terlalu detil, cuma instalasi dan running sample codenya doank.. yang penting link-link pentingnya sudah diamankan.. [emoji grinning face with smiling eyes]

1. PyCUDA = python + cuda

Download: pypi/pycuda
Instalasi: PyCuda/Installation
Dokumentasi: documen.tician.de/pycuda/

2. PyOpenCL = python + opencl

Download: pypi/pyopencl
Instalasi: PyOpenCL/Installation
Dokumentasi: documen.tician.de/pyopencl/

Untuk sementara itu dulu.. kalau ada kesempatan dan mood, kita lanjut lagi..  [emoji grinning face with smiling eyes]

catatan: gpfs on windows node

Here’s a general installation procedure

  1. Create AD Domain User account “root”
  2. Add root account to windows 2008 server administrators group
  3. Logon with root account
  4. Disable Windows UAC – REBOOT
  5. Disable Windows Firewall
  6. Install Role – Services for Network File System
  7. Install Feature – Subsystem for UNIX-Based Applications
  8. Download “Utilities and SDK for UNIX-based Applications_AMD64”
    Start > Program > Subsystem for UNIX-based Applications > Download Utilities for Subsystem …
    Select All Components
    Select All Unix features – SuToRoot, setuid, case sensitive
    REBOOT
  9. Install Boostrap Installer
    ftp://ftp.interopsystems.com/pkgs/bootstrap/pkg-2.10.9-bootstrap60x64.exe
    run pkg-2.10.9-bootstrap60x64.exe – accept install updates
  10. Install OpenSSH
    open a C shell
    $ pkg_update -L openssh (require internet connectivity)
  11. Create ssh key and configure passwordless logon with other cluster nodes
  12. run GPFS-3.3.Windows-cz1rpen.msi – REBOOT
  13. uninstall gpfs 3.3 using “add/remove programs”
  14. install gpfs-3.3.0.1-WindowsServer2008-x64-update.msi
  15. Launch C Shell
    chown -R root /var/mmfs
    chown -R root /var/adm/log
    chown -R root /var/adm/ras
    chown -R root /usr/lpp/mmfs
  16. Activate GPFS win service,
    mmwinservctl set --account <rootaccount> --password <rootpassword>
    mmwinservctl enable
  17. On GPFS cluster manager,
    mmaddnode <win-node>
  18. Back to win node,
    mmstartup
    mmmount <device> <driveLetter>
  19. error log is in /var/adm/ras/mmfs.log.latest

catatan: gpfs on linux node

cuma catatan installasi gpfs di linux nodes (client side)…

  1. make sure ssh connection between gpfs server and client.. kalau perlu tambahkan “StrictHostKeyChecking no” pada sebuah file “config” dalam folder “.ssh”
  2. install gpfs base rpm
    gpfs.base-3.3*.rpm
    gpfs.gpl-3.3*.noarch.rpm
    gpfs.msg.en_US-3.3*.noarch.rpm
    gpfs.docs-3.3*.noarch.rpm
  3. install gpfs update rpm
  4. building gpfs portability layer… it needs package kernel-smp-devel-<uname -r>.EL
    cd /usr/lpp/mmfs/src
    make Autoconfig
    export SHARKCLONEROOT='pwd'
    make World
    make InstallImages

    this will build some binaries in /usr/lpp/mmfs/bin
  5. at the server side, add client for gpfs service
    mmaddnode <node>
  6. at the client side, run mmstartup