Performance tuning

ikevin8me

Active Member

Reaction score: 12
Messages: 198

I notice that after successful installation of KDE on FreeBSD, there are many files linked into the kernal, as shown by the command "kldstat".

(1) I wondering where is this configured - what file(s)? I checked /boot/loader.conf and /etc/rc.conf and couldn't find them there.
(2) Is there a listing explaining what each one is doing?
(3) Can/Should some be removed to improve performance (ie. lessen memory usage) and security (e.g. disable Bluetooth - ng_bluetooth.ko, etc.)

Thanks!
 

Alain De Vos

Daemon

Reaction score: 608
Messages: 2,056

In general removing a kernel module does not make your pc runs faster.
My advice would be try to build some knowledge what each module is doing. E.g. reading man-pages, searching this forum.
 

grahamperrin

Daemon

Reaction score: 516
Messages: 1,684

… shown by the command "kldstat". …

Give your use of KDE, kernel modules probably include graphics-related drm.ko; plus a variety of DRM-related modules that are specific to your graphics hardware.

Here, for example:

Code:
% kldstat -h | grep radeon    
56    1 0xffffffff8383d000  1.3M radeonkms.ko
58    1 0xffffffff8399e000   13K radeon_TURKS_pfp_bin.ko
59    1 0xffffffff839a2000   14K radeon_TURKS_me_bin.ko
60    1 0xffffffff839a6000   11K radeon_BTC_rlc_bin.ko
61    1 0xffffffff839a9000   32K radeon_TURKS_mc_bin.ko
62    1 0xffffffff839b1000   32K radeon_TURKS_smc_bin.ko
63    1 0xffffffff839ba000  208K radeon_SUMO_uvd_bin.ko
%


loader.conf(5)

rc.conf(5)

sysrc(8)

I also use KDE Plasma, and choose to use autofs.

sudo sysrc -f /boot/loader.conf autofs_load="YES"
 

astyle

Aspiring Daemon

Reaction score: 348
Messages: 815

The .ko files are all located in either /boot/kernel/ or /boot/modules/. For example, amdgpu.ko lives in /boot/modules/, but fusefs.ko lives in /boot/kernel/. # kldload doesn't care, it will load your .ko from either directory, but /boot/loader.conf is the preferred way to load modules. And yeah, do read the manual pages. I'd also suggest having a way to go back if you mess up.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,972
Messages: 38,423

but /boot/loader.conf is the preferred way to load modules.
No, not any more. Only add drivers to /boot/loader.conf if you need them to boot the machine, everything else should go in kld_list in /etc/rc.conf.
 

Trihexagonal

Son of Beastie

Reaction score: 2,297
Messages: 2,866

I notice that after successful installation of KDE on FreeBSD, there are many files linked into the kernal, as shown by the command "kldstat".

(1) I wondering where is this configured - what file(s)? I checked /boot/loader.conf and /etc/rc.conf and couldn't find them there.
(2) Is there a listing explaining what each one is doing?
(3) Can/Should some be removed to improve performance (ie. lessen memory usage) and security (e.g. disable Bluetooth - ng_bluetooth.ko, etc.)
I like a good train wreck as much as anyone else.

However, if you have to ask any of those questions you, yes you, should Not be Performance Tuning anything but your Tuna Fish sandwich.

Because this is how train wrecks start. I've watched many over the past 4 years since posting my Beginners Tutorial and this is how a good one begins.

If it isn't broke don't break it. Leave it alone.

My standard advise I doubt anyone listens to, but I tried... Me, yes, my.

Till you, yes you, are a seasoned Train mechanic and know a hobo from a .ko about tuning a train you just started driving.
 

jardows

Active Member

Reaction score: 68
Messages: 111

I like a good train wreck as much as anyone else.

However, if you have to ask any of those questions you, yes you, should Not be Performance Tuning anything but your Tuna Fish sandwich.

Because this is how train wrecks start. I've watched many over the past 4 years since posting my Beginners Tutorial and this is how a good one begins.

If it isn't broke don't break it. Leave it alone.

My standard advise I doubt anyone listens to, but I tried... Me, yes, my.

Till you, yes you, are a seasoned Train mechanic and know a hobo from a .ko about tuning a train you just started driving.
This reminds me of a time years about - about 1996, where I worked at a local computer shop, and we had sold a customer a computer that still had Windows 3.1 on it. He brought it back three times for a warranty exchange within a couple of weeks saying that it was broken. We finally figured out that one of the first things he did when he got it home was, in the effort to save space and make the computer run faster, opening up File Manager and deleting any files he did not recognize.
 

astyle

Aspiring Daemon

Reaction score: 348
Messages: 815

No, not any more. Only add drivers to /boot/loader.conf if you need them to boot the machine, everything else should go in kld_list in /etc/rc.conf.
Before 13-RELEASE, that was actually problematic in my setups - I always had to make sure that /boot/modules/amdgpu.ko was the very last line in /etc/rc.conf. If I didn't do that, not only xorg wouldn't start, I would get stuck with a squiggly rainbow filling my screen, and I would have to use a rescue disk with vi to comment out the offending line and try again.
 

grahamperrin

Daemon

Reaction score: 516
Messages: 1,684

… rescue disk with vi …

For edition of /etc/rc.conf it's usually easier to boot in single user mode. Option 2:

1623200360404.png


Alternatively (if you don't key 2 in time) you can hold Control-C some time after multi-user mode begins. Not too soon.
Release the two keys after you're certain that you've done enough to suppress start of SDDM or X.Org or whatever, then key Control-Alt-F2
 

astyle

Aspiring Daemon

Reaction score: 348
Messages: 815

However, if you have to ask any of those questions you, yes you, should Not be Performance Tuning anything but your Tuna Fish sandwich.
How about some sushi-grade ahi tuna on a bed of organic iceberg lettuce, stuffed into a croissant that is baked according to European standards, not American ones? Now that's what I call a performance-tuned Tuna Fish sandwich.
 
Top