What is Long Tail Latency or Tail Latency in the Context of Application/Website/System Performance?

Question
What is long-tail latency or tail latency?

Answer
Tail latency is the worst performing time-measured response from an application. Outliers can be described as requests that take far longer than others in a statistical sample. Such irregular durations, with long latencies, are said to be at the tail-end of a chart or graph. Long-tail latency would generally refer to the worst 1% or worst 2% of the requests. (One source of this article is this external posting.)

See also page 15 of Designing Data-Intensive Applications by Kleppman. You may want to read about SLIs and SLOs here.

How Do You Find the Requests, Limits, and Replicas of Pods Deployed from Helm Charts?

Problem scenario
You do not have the YAML (.yml or .yaml) files for your Helm deployments.

How do you find the pod manifests for the yaml files when you do not have access to the Helm repos?

Solution
Run this:

helm ls -a -A

The output will show a "Name" on the left most column and a namespace in an inner column. (To learn more about these command see https://helm.sh/docs/intro/quickstart/ and https://v3.helm.sh/docs/helm/helm_list/.)

Next, run commands like this (but replace "foobar" with the name of the release/deployment you want to view the YAML for and replace "coolnamespace" with a namespace found in the above command):

helm get manifest foobar -n coolnamespace

(For more information, see these links: https://helm.sh/docs/helm/helm_get_manifest/ or https://helm.sh/docs/helm/helm_get/.)

Another command that may help is this (but replace "foobar" with the name of the release or deployment you want to view the YAML for):

helm list foobar --output yaml

(It was adapted from this stackoverflow.com posting.)

In Azure DevOps Pipeline Test Results, Why Do You See a Release That Was Not Run in a While?

Problem scenario
You look at some previous pipelines' test results. The tests show failing tests. There is a temporal field for "Failing since" and another field called "Failing release." You have not run the release that is listed as failing in a while. Why isn't it showing the most recent release?

Possible Solution
The root cause is consecutive failures and possibly a poorly named column heading. We believe the "Failing release" field omits the word "since." We believe it could be read as "Failing since release". In other words, we think the old release name that has had a failure is listed. Therefore the test results show it has been failing ever since then. That is why you do not see the most recent release.

For more information, you may find this external site helpful.

It could be that a more recent release was successful.

How Do You Use the strace Utility?

Problem scenario
You want to use the strace command. How do you use it?

Solution

  1. Go to a Linux command prompt.
  2. Run this: sleep 100 &
  3. Look at the number the above command produced (e.g., 310222). Craft a command like this (but replace 310222 with the number in the above command): strace kill 310222
  4. Run the command drafted above. You should see lines like "openat…" and "kill". In the kill command you will see the returned signal from the kernel (e.g., SIGTERM)
  5. Run this: sleep 100 &
  6. Look at the number the above command produced (e.g., 310222). Craft a command like this (but replace 310222 with the number in the above command): strace kill -9 310222
  7. Run the command drafted above. You should see lines like "openat…" and "kill". In the kill command you will see the returned signal from the kernel (e.g., SIGKILL)

FFR
The -9 flag in kill will kill a process; normally kill would just terminate the process.

To learn more about strace, see this external posting.

How Do You Install opencv / cv2 without pip3 so The -DWITH_FFMPEG=ON is Set On?

Problem scenario
You do not want to use pip or pip3 to install opencv. How do you install opencv (with the -DWITH_FFMPEG=ON flag)?

Solution
Prerequisite
This assumes that cmake has been installed. If you are running Ubuntu/Debian, run this: sudo apt -y install cmake
If you are running CentOS/RHEL/Fedora (some RedHat derivative), run this: sudo yum -y install cmake
If you are running SUSE, run this: sudo zypper -n install cmake

Procedures

Run these commands:

wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip

sudo cp -i opencv.zip /bin/
cd /bin
sudo unzip /bin/opencv.zip
sudo mkdir build && cd build
sudo cmake ../opencv-master -DWITH_FFMPEG=ON

How Do You Install and Create a Virtual Environment?

Problem scenario
You want to use a virtual environment to install pip packages. You want to run a Python program with a module that will require a pip installation. What should you do to install and configure the environment and then enter it using Ubuntu/Debian Linux?

Solution

sudo apt -y install python3-virtualenv
sudo apt -y install python3.*-venv
python3 -m venv cont_int #replace "cont_int" with the name of the directory you want to create
cd cont_int
source bin/activate

How Do You Make Your Laptop Have Two Different OSes?

Problem scenario
You have a Windows laptop with a DVD player. You want to boot to a Linux hard drive from time-to-time. But you do not want to dual boot the same hard drive (where one hard drive supports two different bootable OSes). What should you do?

Solution
You should purchase a hard drive adapter (aka a caddy) made to interface with the internal DVD player connection. You will lose space for your DVD player if you do this (and have one fewer DVD drives). But if you have a second hard drive, it can go where the DVD player is. (If you change your mind later and want to go back to having a DVD player, you can do that.)

How Do You Change the Orientation of Google Maps?

Problem scenario
You want Google maps to rotate rectangularly when you use your Android device as a GPS in your car. You want to view the map so the width of the screen and height change 90 degrees based on the way you hold the phone (so it responds to gravity). How do you get the screen to adjust to have a layout that is appropriate for holding the smart phone sideways?

Solution
Go to the top of the screen and swipe downwards.
Click the "Portrait" icon.

(It should change to auto rotate). That's it.