Skip to main content

Questions tagged [optimization]

The tag has no usage guidance.

0 votes
2 answers
61 views

Difference behavior of C program compiled with GNU -O2 and -O3

I am working on an embedded Linux system (5.10.24), and there are several applications running in it. Recently, I found something strange with one C program as follows. The C program uses APIs ...
0 votes
1 answer
23 views

Could use docker for app isolation?

I am studying the use of Docker in a big scale project that is actually deployed on production. I never used docker before, but for what I read, it consinst about a new layout called "Container ...
28 votes
4 answers
75k views

How to compile without optimizations -O0 using CMake

I am using Scientific Linux (SL). I am trying to compile a project that uses a bunch of C++ (.cpp) files. In the directory user/project/Build, I enter make to compile and link all the .cpp files. I ...
0 votes
0 answers
44 views

Optmization and tuning Linux Server (Mediaserver)

I rebuilt a server, specifically a mediaserver, based on debian 12 stable (kernel 6.1). CPU: i7-6700K(no overclock) RAM: 16GB DDR4 (dual channel) NIC: 2 of 2.5Gbit (bonding balance-tlb) (MTU bond0: ...
0 votes
0 answers
79 views

Big Maildir mailspool - looking for ways to improve performance

I have an extremely large Maildir which contains emails going back many years. I need to rebuild the server and would like to improve the mail storage setup. My main problem is that backups of the ...
0 votes
0 answers
101 views

PostgreSQL: indexes and partitions

I have a PostgreSQL database and I noticed a weird behaviour while working with indexes and partitions. The engine version is 10.21. Now, I have a table with this structure: guid varchar(50) PK guid_a ...
1 vote
1 answer
155 views

Speed up grep usage inside bash script

I am currently working on creating a bash script that is supposed to process large log files from one of my programs. When I first started the script took around 15 seconds to complete which wasn't ...
0 votes
2 answers
175 views

How to resize images on sequential functions?

I am trying to: change the format of my images, then resize their height and width of 40% then optimize their quality to 35% max of the source and the total size of the image to 35% of the origin. ...
0 votes
1 answer
246 views

Parse huge amounts of files efficiently

I have a folder that holds hunderds of thousands of files called hp-temps.txt. (There are also tons of subfolders) The content of these files looks like this for example: Sensor Location ...
2 votes
2 answers
1k views

Set usb flash drive as non rotational drive

I'm trying to optimize the IO schedulers and to use a proper scheduler for rotational and for non rotational drives (different). When I run: cat /sys/block/sd*/queue/rotational I get: 1 <-- ...
1 vote
1 answer
3k views

Build the Linux kernel without gcc optimization

I follow one of many tutorials found on Google results to build and debug the Linux kernel with gcc and kgdb/gdb. And I end up by discovering that is all waste of time. Since I can't compile the ...
5 votes
3 answers
17k views

Allocating Swap Space with KVM

Consider the following scenario: a host with 2 GiB runs a few guests using KVM.  Each guest does usually not need much memory; they are given 256 MiB each and run services that mostly twiddle their ...
0 votes
1 answer
748 views

CLI tool that compress the given image, whatever file type the image is (png, jpg, gif, webp, svg)?

I know that there are many tools to optimize an image: pngquant optipng jpegoptim gifsicle exiftool ecc but they are all specific for a certain file type. Is there a single command line that, ...
1 vote
0 answers
190 views

Pipewire using 2x processes when idling

I recently had my BT headphones stutter and cut out and realized that during CPU intensive processing, pipewire is dropping frames. My overall goal, then, is to streamline processing to make that ...
0 votes
1 answer
29 views

Timing desktop environment initialization

Is there a way to time desktop environment initialization and perhaps identify delaying candidates?

15 30 50 per page