Questions tagged [performance]

The speed at which a program runs

Filter by
Sorted by
Tagged with
8
votes
3answers
1k views

When moving files between two external drives, are they temporarily written to the internal hdd of the computer?

While moving a big chunk of data between two external USB drives, I notice my laptop is slowed down. It was my understanding that the files are not written to any intermediate location (such as /tmp ...
21
votes
3answers
3k views

Are compiled shell scripts better for performance?

After some googling, I found a way to compile BASH scripts to binary executables (using shc). I know that shell is an interpreted language, but what does this compiler do? Will it improve the ...
0
votes
0answers
8 views

mtr interpretation for network/hardware performance

Sorry for being so elaborate on this one. Few days ago noticed this problem, my work VPN kept disconnecting frequently on my OFC broadband connection. It became so bad that I had to revert to 3G ...
7
votes
2answers
330 views

“Useless” use of 'cat' increases performance. Why?

The files 1..64 are each 160 MBytes and stored in a RAM disk. Generated by: seq 120 | parallel -k 'seq {}0000000 {}9999999 | fmt -30' | head -c 10G > 10G parallel --pipepart --block -1 -a 10G 'cat &...
2
votes
0answers
72 views

Why are writes so slow on ext4?

I'm trying to work out why writing to ext4 partitions on my server is so slow. I noticed this issue when I reformatted my off-site backup drives from ExFAT to ext4. When these drives were formatted as ...
3
votes
1answer
82 views

Opening two Chrome windows on Fedora 32 is very slow

I am running a Fedora 32 on my XPS 13 laptop. I use Chrome as my browser, and I have 2 profiles - work and personal. When I open a new profile, it opens a new Chrome window. However, both windows lag ...
2
votes
1answer
36 views

mlocate: how to print files only [duplicate]

I have the following version of locate: $ locate --version mlocate 0.26 Copyright (C) 2007 Red Hat, Inc. All rights reserved. This software is distributed under the GPL v.2. This program is provided ...
1
vote
0answers
27 views

Is there an overhead in my code that makes my threading slower [C++] [migrated]

I have created two programs that find the determinant of 2 matrixes, with one using threads and the other without and then recorded the time taken to complete the calculation. The threaded script ...
-1
votes
2answers
53 views

How can I load an executable into the RAM for periodic calls?

In a long-running Bash script, I'm calling a custom executable (getIdle) which returns the idle time of the system. As I have to periodically call this executable, I guess it creates a huge read ...
0
votes
1answer
25 views

How to auto-recompile the Linux Kernel with my hardware-specific needs?

MX Linux 19.2 amd64 - XFCE 4.14 Is there a script or application that detects in-deep all my hardware details, in a manner this auto-configures and recompile the Linux Kernel that works for my current ...
2
votes
2answers
32 views

RAID1 primarily used disk

I'm kinda new to the setup of raid-drives. So my current setup looks like this: Disk1: 1x NVMe DataCenter Edition 960GB ("low" IOPS) Disk2: 1x NVMe Octane 480GB (high IOPS) Disk 1 has 3 ...
0
votes
2answers
72 views

Very low read speed from LTO6 tape in Linux CentOS

Dear technical experts, For a number of weeks now I've been trying to extract data from an LTO6 tape without having too much success on the speed department. I'm using 'dd' to dump the tape content ...
0
votes
1answer
48 views

Whats the most efficient way to update a variable in a file?

Short Question: Whats the most efficient way to update a single numbered variable in a file? Long Question: I'm looking at the output of a security program (fail2ban) which logs which hosts have been ...
0
votes
0answers
27 views

Limiting the resources used by a process

This is now the third time I've had this problem and had to look up how to do it with the specific caveats of my particular instance. As such I want to write a script that will go through all the ...
0
votes
1answer
51 views

how to check memory usage, in detail

There are commands such as top, ps, pmap (and others) that show how much memory is used by a process, but they only show the total memory. Using the free -g command output we see total, used, shared, ...
0
votes
1answer
39 views

High RAM and swap usage out of seemingly nowhere

(Manjaro 20, Linux 5.8.3, KDE, this laptop) When reasonably much is going on in my system, the RAM and swap usage often goes much higher than it should. For example currently I have a VM with a VM in ...
0
votes
1answer
10 views

Timing Desktop Environment Initialization

Is there a way to time desktop environment initialization? And perhaps identify delaying candidates? Thanks in advance
2
votes
1answer
29 views

Why my download speed is just half of the speed given by my Wi-Fi providing device in Ubuntu 20?

I had just upgraded to Ubuntu 20 (focal fossa). When I try to download anything in any browser or through terminal, the downloading speed in my PC is just half of my Wi-Fi providing device. Please ...
2
votes
0answers
39 views

How do I see how much CPU time my firewall uses?

I was attacked with a DNS Amplification and as a result added nearly 4,000 IP addresses to my firewall using fail2ban. I have seen many people worried about how many rules they include in their ...
5
votes
5answers
1k views

Most efficient way of changing 1 line in a file

I want to change the first line of hundreds of files recursively in the most efficient way possible. An example of what I want to do is to change #!/bin/bash to #!/bin/sh, so I came up with this ...
0
votes
1answer
46 views

Process with 1% CPU usage causing load average of 1.5

We recently observed a high load average of about 1.5 on our embedded system, even though pretty much all processes are supposedly sleeping (according to htop). The system in question is a dual-core ...
1
vote
0answers
18 views

How is disk utilization measured?

For context, I am a self-taught developer, and I picked up Cloud operations along the way. I gained the interest on Performance, so I picked up the book "Systems Performance" by Brendan ...
0
votes
0answers
8 views

Monitor the resource consumption during a system load and send a report to a file

I would like to monitor the resource consumption (cpu, ram, disk) during a system load and send a kind of report to a file during this load, RHEL7 operating system. Can you recommend any way to do ...
0
votes
2answers
79 views

What command in a SCRIPT will cause the next “ls” to list the files IMMEDIATELY?

Summary What command can I run in a bash script that will make the next ls at a terminal list the files in a directory immediately, instead of having to wait 10 seconds? And see Questions 1 and 2 at ...
0
votes
2answers
39 views

How to monitor read & write speed to specific device or mount point

How can I monitor the read & write speed to a specific device or mount point in Linux, for example /dev/sdc2 which is mounted to /mnt/data/? Would like to display the speed in MB/s for example and ...
1
vote
1answer
17 views

Is there a way to “verify” the performance of a video chip/driver from the command line?

Is there a way to "verify" (or compare) the performance of a video chip/driver from the linux/unix command line? Thanks! :) Asher
0
votes
0answers
21 views

Very high kernel procces time usage in new, idle server

We've recently installed a new server, which shows very high process usage in the kernel - as seen here with htop: the cores and memory are reserved - so the usage is normal - but I've never seen ...
0
votes
1answer
33 views

What can a debugger do with /proc that cannot be done with ptrace?

The Wikipedia article on ptrace says: Communications between the controller and target take place using repeated calls of ptrace, passing a small fixed-size block of memory between the two (...
2
votes
4answers
87 views

How to speed up grep on large history?

I have an unlimited .zsh_history which is currently at 10k lines. I often want to see all commands from history that have a certain string, for example curl. If I do history | grep curl it takes a ...
1
vote
0answers
21 views

Cleaning cache (?) command du [duplicate]

Following this question I can reproduce that the first time I execute a du of a directory it takes longer than if I do it just after. Where is this caching happening? How can I clean it? I would like ...
7
votes
4answers
975 views

Measuring disk usage of specific file types per each directory (recursively, as a demo for 'du --include')

This is my working code, but I believe it's not optimized - there must be a way to complete the job much faster than this: find . -type f -iname '*.py' -printf '%h\0' | sort -z -u | xargs -r -0 -I{...
1
vote
1answer
27 views

measure time spent reading history file when starting a new interactive bash shell

If I had a sleep command or something else slowing down execution of .bashrc, I can profile it to see the slow parts like this: $ printf "set -x\nPS4='+\\\\t '\nexport HISTFILE=empty\nsleep 4\...
0
votes
0answers
31 views

How to take stack samples using `perf` based on wall-clock time

I am trying to use Linux's perf_events framework to investigate an issue with an application on one of our servers. Based on my reading about the perf tool, collecting stacks is relatively ...
3
votes
1answer
62 views

Gtk apps slow if not root

Some of my Gtk apps (Virt-Manager, Nautilus & Easytag) are really slow to start when I start them as a normal user. However when they are started as root, they start instantly. How can I fix that? ...
0
votes
0answers
74 views

IPSec multithreading via pcrypt worse than single thread

According to this document: https://www.strongswan.org/docs/Steffen_Klassert_Parallelizing_IPsec.pdf parallelizing IPSec using pcrypt kernel module will make the connection much more efficient (graphs ...
1
vote
2answers
125 views

How to read file every Nth character the fastest way possible?

I already know a couple of ways to read a file every Nth characters in bash: LC_ALL=C while read -n100 character; do echo "$character" done < <(cat "$@" | tr -d '\n') ...
0
votes
0answers
19 views

Limiting the gnome-shell frame-rate

Is it possible to limit the Gnome-shell's Frame-rate for the sake of lower GPU usage ?
0
votes
0answers
24 views

Where to permanently put an “ethtool -L eth0 combined 56” cmd?

We have Mellanox network cards on SLES12.3 servers and need to set the: ethtool -L eth0 combined 56 to have good performance. But where to put this setting, to be permanent? Best is so far in an ...
0
votes
6answers
655 views

Faster way to enumerate number than GNU seq? [closed]

I want to enumerate numbers (between 1 to 10136 range) but so far, most tools and trick I tried would struggle after 109 numbers or so... Here some examples (with smaller range): For seq 99999 real ...
0
votes
2answers
89 views

rsync command is taking too long each time

For a long time I've been using rsync and a usb cable to get the photos from my phone's SD card onto the PC. This is the current command: rsync -azvu --ignore-existing --progress SD-Karte/DCIM/Camera/ ...
0
votes
0answers
29 views

CPU load and CPU usage impact on processes

I have looked into a fair bit of online forums and blogs to understand the impact of CPU load and CPU usage on processes. By CPU Load I mean the Load average which appears in top command. 1min, 5min, ...
4
votes
1answer
24 views

is there a Linux command like top to view CPU utilization in the Past?

If I use the top -i in Red Hat 7.4, I can view CPU utilization and the PID of the respective process in real time. Is there a way to view a capture of CPU utilization and PID for a date/time in the ...
1
vote
0answers
26 views

How to test USB stick speed?

I have a USB stick I'm trying to measure the read and write speed on. I'm having trouble deciding whether I should write random data or zeros, and how much. I want to do this as fast as possible, ...
1
vote
0answers
127 views

How to reduce cache size for radix_tree_node?

Is is possible to reduce the space used for radix_tree_node cache in Linux without reducing overall cache size? For example, I currently have $ sudo slabtop -sc --once | awk '{ if (0 + $1 > 0) { ...
1
vote
1answer
25 views

Accessing certain locations on a home server, hangs/times out. How can I find the cause and fix it? [closed]

Accessing these locations from Windows times out or. in worse case, hangs until restarting smbd. Accessing them via SSH hangs until the connection is closed. I forcefully checked the RAID5 array where ...
0
votes
0answers
14 views

Configure huge pages for Oracle RAC installation

I am going to install an Oracle RAC 18c environment over rhel 7.5 and I do not fully understand how I should configure the huge pages section ... specifically what values to put in nr_hugepages and if ...
0
votes
1answer
47 views

Emulation performace : x86 vs ARM [closed]

Some time ago I ran an ARM android image inside the android AVD in my x86 system and it was too slow to even move the cursor smoothly. Since it needs to actually translate ARM instructions to x86 on ...
9
votes
4answers
949 views

Why is tail file | tr (pipeline) faster than sed or perl with many lines?

I have a file with about one million lines, like this: "ID" "1" "2" "00000687" 0 1 "00000421" 1 0 "00000421" 1 0 "00000421" 1 0 with the last line repeated more than one million times. Taking ...
0
votes
1answer
94 views

Why the syscall performance on kernel 5.2 is much lower than kernel 2.6?

I am testing the performance of syscall on different kernel(The hardware are same): The test code #define _GNU_SOURCE #include <unistd.h> #include <sys/syscall.h> #include <sys/types....
0
votes
2answers
27 views

USB disk performance 50% of expected

I would expect cat /dev/sdd >/dev/null to give approximately the same amount of data each second if the disk does nothing else. But on this USB disk I see: Device rkB/s wkB/s %util sdf ...

1
2 3 4 5
18