You are not logged in.

#1 2017-02-15 12:46:56

anony
Member
Registered: 2017-02-15
Posts: 7

I want to optimise my kernel 10000x

Hi. I have actually been an archlinux user for many years, but i have lost my login details and haven't been on the forum or archlinux for years.

I switched back to archlinux a month ago though(from windows - unfortunately had to use it for work) and i remember experimenting with the kernel a couple years ago, making a slow comp react instantly by ricing the kernel insanely.

I barely knew what i was doing then, but simply googled for patches for the linux kernel applied them & sat various options in kernel conf.

I can't really remember now though and see that at least one of the patches i used aren't in dev anymore(tiny linux).Do anyone have some ideas how i can do this? The load i have is mostly having a bunch of bitcoin exchanges open in a browser that do a lot of javascript & graphics and i need to be able to run the whole thing smoothly while swtitching between windows, writing scripts, etc. Im already using qupzilla which helped a bit.

So to tl;dr: i don't need a lot of the extra functions in kernel but can't remember which options were good to disable/enable. i'm trying to build a tiny kernel tailored for this comp, a thinkpad T410. I don't need printer support for example, don't need bluetooth etc. Any ideas for which patches to apply, which options to muck with in kernel settings?. I also got an idea right now. i frequently run out of mem and ive heard its possible to use usb as extra mem but i actually need this usbstick, but can use most of the space on it for memory. Is it possible still or do i need to delete its contents?

Danke! Bonjour!

Last edited by jasonwryan (2017-02-28 21:39:00)

Offline

#2 2017-02-15 12:49:20

anony
Member
Registered: 2017-02-15
Posts: 7

Re: I want to optimise my kernel 10000x

I recall now using another compiler. think it was an intel compiler but im not sure. is gcc now so good no other compilers will do a better job or is there some additional gain to be got here like last time(without problems down the road)?

Last edited by anony (2017-02-15 12:50:26)

Offline

#3 2017-02-15 15:22:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: I want to optimise my kernel 10000x


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2017-02-15 19:37:25

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: I want to optimise my kernel 10000x

1. there are no magic patches that will magically make your hardware 10000x faster and your software stop sucking.
2. building a custom kernel is unlikely to do anyhting for you. An the arch kernel is quite modular so if you don't want/need bt support then simply don't load the bt related modules.
3. using a usb stick as ram is a *really* bad idea both from a performance and a reliability standpoint. It is likely to kill the usb stick quite fast
4. http://www.downloadmoreram.com/

edit:
Only way to avoid running out of ram is:
-  Install more ram
- Make your software use less ram.

A custom kernel will have very little impact on the ram usage.

Last edited by Mr.Elendig (2017-02-15 19:40:04)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2017-02-15 19:48:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: I want to optimise my kernel 10000x

Mr.Elendig wrote:

3. using a usb stick as ram is a *really* bad idea both from a performance and a reliability

Agreed.  10000x agreed.

In addition to reducing unneeded ram use, use a swap file.  Swap is slow, but if you need it you need it.  A flash drive may be flash memory, but it's still going over USB.  While the the newest USB devices and ports are better, I get the impression you're not on particularly modern hardware.  Common USB hardware can have transfer rates often much slower than a modest hard disk: so more "ram" on a usb drive will be slower than a swap file on the HDD (*especially* for writes).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-02-15 20:28:43

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: I want to optimise my kernel 10000x

"Autogroup scheduling"  was integrated in 2.6.38
https://lwn.net/Articles/418884/

zswap and zram trade memory for CPU to "increase" your RAM, but to get more RAM, simply add more RAM. Really.

There's no software magic to improve your hardware. Never been, will never be. That's all fraud.

Offline

#7 2017-02-15 21:14:18

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: I want to optimise my kernel 10000x

if you have really old hardware, using a custom kernel with a different scheduler might help. there's custom patchsets in the AUR, just remember that you'lll need to match any hardware drivers to them as well, and it might not be as big of a panacea as you think it is.

Offline

#8 2017-02-15 23:17:01

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: I want to optimise my kernel 10000x

An easy win is to install liquorix kernel.

Offline

#9 2017-02-28 09:57:06

anony
Member
Registered: 2017-02-15
Posts: 7

Re: I want to optimise my kernel 10000x

Thanks for all the responses. Sorry for late reply but i think what i found may be useful for others so i will list what i did.

I found that the major source of slowdown was that the linux kernel swapped too much. This made linux use a lot more swap than it should so i sat vm.swappiness to 0. Admittedly this makes applications just flat out shutdown sometimes - so a safer value is probably 5, or 10 or something - but i much prefer this to having my computer stall and me having to end the program anyway, usually.

The liquorix kernel *seems* to have brought some additional speedups. Notably, it was slow to go from a vim window in konsole(yes, i use kde, i have to have all the features smile) to a webppage for example. This is no longer the case.

I also used systemd-swap although im not sure this actually brought any speedups, the major factor seems to have been vm.swappiness and liquorix.

I would use an usb stick because i dont agree with the criticism as long as you 1) set a low vm.swappiness value so that it doesnt swap so often and your disk doesnt get worn out superquick and 2) you have a quick usb...

The argument that "the hd is faster" doesn't matter so much then, because the whole reason the computer slows down is because of too many write operations. So if you oursource those write operations to another medium you have the hd free...

Ok. Thank you for the help.

Offline

#10 2017-02-28 23:37:43

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: I want to optimise my kernel 10000x

As per wikipedia, a swappiness of 0 will *disable* swap. Therefore, you want 1 or above.

Offline

#11 2017-03-01 08:10:02

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: I want to optimise my kernel 10000x

I'd rather look at other offenders - like the baloo indexer or something sucking all RAM. The T410 was aparently build and sold 2010/11 and will most likely have 4GB RAM - even 2GB would be entirely sufficient, but the indexer processes are all blatant crap and easily take down the system. Another famous waste is "But I like to have 1000 browser tabs open"

If you "frequently run out of mem" the only reasonable strategies are
a) get more RAM
b) get rid of memhog processes

Disabling swap to deliberately run into OOM is hardly a solution.
You can also pass a memory quota to crappywrittensoftware™ to control a process that swallows your RAM (man prlimit)

Offline

#12 2017-03-01 10:15:21

anony
Member
Registered: 2017-02-15
Posts: 7

Re: I want to optimise my kernel 10000x

seth wrote:

Disabling swap to deliberately run into OOM is hardly a solution.

That's why i said you could pass vm.swappiness = 5 or 10. I sat it to 1 now and havent had any more crashes but haven't tested a long time.

prlimit is something i didnt know about, but everything seems to be running smoothly now. I had already disabled the indexer(why doesnt a good indexer exist at this point :S) and changed browser to qupzilla, because as you say - for us 1000 tabbers - this is a big memory sink.

Offline

Board footer

Powered by FluxBB