Menu

linux/

Intel i5-10400 CPU benchmark

CPU benchmark from desktop PC

$ sysbench cpu run --time=5
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 1
Initializing random number generator from current time


Prime numbers limit: 10000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:  1389.45

General statistics:
    total time:                          5.0001s
    total number of events:              6949

Latency (ms):
         min:                                    0.70
         avg:                                    0.72
         max:                                    1.04
         95th percentile:                        0.75

Threads fairness:
    events (avg/stddev):           6949.0000/0.00
    execution time (avg/stddev):   4.9991/0.00
· 22 Feb 2021

Install nvidia drivers

Verify your GPU:

/sbin/lspci | grep -e VGA

Make sure you:

  • disabled Wayland
  • disabled Secure Boot

Make sure you system is up to date (reboot if something was installed):

sudo dnf update -y

Install nvidia driver:

sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda

Wait until kernel module is compiled.

Enable video acceleration and some extras:

sudo dnf install vdpauinfo libva-vdpau-driver libva-utils xorg-x11-drv-nvidia-cuda-libs xorg-x11-drv-nvidia-cuda

Reboot system.

Verify that nouveau driver is disabled:

lsmod |grep nouveau
· 20 Feb 2021

Disable Selinux

Edit this /etc/selinux/config file and follow instructions

· 20 Feb 2021

Disable Wayland and switch to X11

By default fedora uses Wayland. Make sure the following section exists in /etc/gdm/custom.conf:

[daemon]
# Uncomment the line below to force the login screen to use Xorg
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
· 20 Feb 2021

Record all traffic on specific port

Create TCP dump of all traffic on localhost on port 8888

sudo tcpdump -i lo "port 8888" -w dump
· 15 Feb 2021

tar: Archives cheatsheet

Create archive:

tar -czvf compressed_file.tar.gz original_file.sql

Extract files:

tar -xzvf compressed_file.tar.gz
· 13 Feb 2021

Keep running ssh command after disconnecting from the server

nohup database_migration.sh &
  • nohup will take care of running the command and forward command output to nohup.out
  • & will run the command in the background

Use tail -f nohup.out to get the output from the command

· 12 Feb 2021

Configure HP printer in fedora

Default Printer application in GNOME (fedora 33) is not able to successfully configure wireless printer, it needs to be done manually:

sudo dnf install hplip hplip-gui
sudo hp-setup

Select Network/Ethernet/Wireless network and your printer will appear in the list. Follow the instructions and add the printer.

· 29 Jan 2021

List files installed by a package

To list all files installed by dnf package:

rpm -ql dnf
· 29 Jan 2021

top-like application for intel GPU

Top-like application to monitor performance of intel GPU:

sudo dnf install igt-gpu-tools
sudo intel_gpu_top

Playing 4k video sample on youtube (intel i3-8100T):

intel-gpu-top: Intel Coffeelake (Gen9) @ /dev/dri/card0 - 1063/1083 MHz;    1% RC6;  7.35/19.18 W;      467 irqs/s

      IMC reads:     6889 MiB/s
     IMC writes:     3901 MiB/s

          ENGINE      BUSY                                      MI_SEMA MI_WAIT
     Render/3D/0   98.29% |██████████████████████████████████▍|      0%      0%
       Blitter/0    0.00% |                                   |      0%      0%
         Video/0    0.00% |                                   |      0%      0%
  VideoEnhance/0    0.00% |                                   |      0%      0%

Playing the same video in 1080p (intel i3-8100T)::

intel-gpu-top: Intel Coffeelake (Gen9) @ /dev/dri/card0 -  591/ 591 MHz;   30% RC6;  3.06/ 6.47 W;      474 irqs/s

      IMC reads:     4058 MiB/s
     IMC writes:     2654 MiB/s

          ENGINE      BUSY                                      MI_SEMA MI_WAIT
     Render/3D/0   55.64% |███████████████████▍               |      0%      0%
       Blitter/0    0.00% |                                   |      0%      0%
         Video/0    0.00% |                                   |      0%      0%
  VideoEnhance/0    0.00% |                                   |      0%      0%
· 18 Jan 2021