Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

My personal weblog for sharing and storing some of my activities related to computer science over the internet

Navid Malekghaini's Personal Blog

Navid Malekghaini

Senior Software Engineer @ Intelligent Cloud Infrastructure Laboratory
Prev. Research Engineer @ University of Waterloo x Orange Telecom

University of Waterloo
Department of computer science
200 University Ave W, Waterloo, ON N2L 3G1, Canada
cs.uwaterloo.ca

contact me
navidmalekedu (AT) gmail (DOT) com [ Primary Email ]
nmalekgh (AT) uwaterloo (DOT) ca

۴ مطلب با کلمه‌ی کلیدی «devops» ثبت شده است

As a seasoned Linux user with a decade of experience, I’ve encountered my fair share of disk space issues on the root filesystem (“/”). In this blog post, I’ll share practical tips to tackle this problem and keep your system running smoothly. Feel free to bookmark this for future reference!

1. Avoid Rebooting

If you notice that your root filesystem is running out of space, avoid shutting down or restarting the system. Restarting can complicate matters further. Instead, follow these steps:

2. Apt Cleanup

  • Run automated cleanup commands:
    sudo apt autoremove  # Removes old packages (especially older kernel images/modules)
    sudo apt clean       # Clears the cache of apt
    
  • Identify and remove large packages using the following command and remove them if not needed:
    dpkg-query --show --showformat='${Package;-50}\t${Installed-Size}\n' | sort -k 2 -n | grep -v deinstall | awk '{printf "%.3f MB \t %s\n", $2/(1024), $1}'
    

3. Clear Snap Packages

  • Clear the snap package cache:
    sudo sh -c 'rm -rf /var/lib/snapd/cache/*'
    
  • Remove disabled snap packages:
    set -eu
    snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
      snap remove "$snapname" --revision="$revision"
    done
    

4. Clean Logs

  • Remove old logs to free up space:
    journalctl --vacuum-time=10d
    

5. Docker Cleanup (if applicable)

  • List big Docker images and containers:
    docker ps -a
    docker images
    
  • Release unused space:
    docker system prune -a --volumes
    
  • Consider moving Docker to a different location (e.g., /home) instead of the root (“/”).

6. Inspect Directories

  • Manually check the size of different directories in the root (“/”) and dig into the root cause:
    du -hs /* | sort -h
    

7. Repartition if Necessary

  • If all else fails, consider repartitioning the root directory (“/”) to reclaim space from other partitions (e.g., “/home”). You can do this at runtime.

Remember, regular maintenance and monitoring disk space can prevent headaches down the road!

موافقین ۰ مخالفین ۰ 11 May 24 ، 01:40

Thanks to Mark Mulrainey, my experience as a DevOps engineer that worked with LizardFS (an open-source distributed storage) for a scalable distributed infrastructure, is now published as a community article on its weblog. Check it out from the link below! 




Check it out here

موافقین ۱ مخالفین ۰ 19 January 20 ، 04:53


Download From Github With Explanations


Various limited documents from my work tools when I used to work as DevOps Engineer, these are basic usage and limited testing results ( because I don't have the premission to publicize the full documents that I have written for my work )

Description:

ETCD_CLUSTER.pdf ==> Setting up an ETCD cluster

objective:

• setup an etcd cluster on 3 servers

• write appropriate service to be sure ETCD will be always running

  • ETCD version ==> 3.3.9

  • server OS ==> CentOS7

The related ansible code are in the mycontrolansible directory.

LizardFS.pdf ==> Setting up LizardFS and testing it

objective:

• setup simple LizardFS master on one server

• test LizardFS performance on 3,5,7 chunk servers (HDD)

• test LizardFS performance on SSD

  • LizardFS version ==> 3.12

ProxySQL.pdf ==> Set up and testing ProxySQL

objectives:

• setup ProxySQL load balancer on one server

• configuring ProxySQL

• test the performance and load balancing of ProxySQL with SYSBENCH

• setup ProxySQL architecture with no single point of failure

telegrafLogparser.pdf ==> Using Telegraf to Parse Custom Logs

objective:

• read custom logs with telegraf

• parse custom logs with telegraf

• generate an output from custom logs to influxdb

The TIG stack [ telegraf, influxdb, grafana ]

DatabaseTestDoc.pdf ==> Testing Database response time

We will test 4 databases ( this doc is very limited and acts as a road map for more professional tests ):

RDB: -mysql -postgres

No-SQL: -mongo -cassandra

GrafanaPrometheus.pdf ==> Setup Prometheus and Grafana for monitoring (very basic)

objectives:

• setup Prometheus server

• setup Prometheus exporters

• setup Grafana server

• setup Grafana dashboard

GalleraCluster.pdf ==> Setting up a MySQL Gallera cluster (very basic)

objective:

• setup an MySQL Gallera cluster on 3 servers

• write apporopiate service to be sure MySQL Gallera cluster will be always running

  • MySQL version ==> 5.7

  • MySQL-wsrep ==> 5.7

  • server OS ==> CentOS7

TCP_tune.pdf ==> Some TCP tuning parameters that i have gathered form internet ( this is a messy doc, just gathered information from Internet, for more info on TCP_TUNING refer to my blog! )

 

Download From Github With Explanations

موافقین ۰ مخالفین ۰ 30 September 19 ، 08:58

Here are the slides from my presentation at Nopayar, when I used to be a DevOps Engineer.

The slide contains many best practices gathered (not written) by me for better scaling and high-availibility of applications. ( mainly web applications)

The slide covers:

  • ScalingHierarchy
  • Pinterest Best Practices
  • Data Partitioning and Sharding Patterns
  • Sharding Considerations and Techniques
  • ProxySQLSharding and
  • ID Generation Approaches
  • Query Optimization


I've tried to put a refrence for each section for more information, but there are some sections that don't have any refrence at all, you can easily find the refrences with a quick search in Internet.


موافقین ۰ مخالفین ۰ 04 June 19 ، 23:57