We are still actively working on the spam issue.

Difference between revisions of "Tweaking Linux"

From InstallGentoo Wiki
Jump to: navigation, search
m (Use tcmalloc/jemalloc instead of Glibc malloc)
(Add deletion notice to start debate)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{stub}}
 
{{stub}}
 +
{{delete|This article only has two tweaks and could easily be merged with multiple other articles}}
  
 
This article was created for Linux users to share tips and tricks with each other.
 
This article was created for Linux users to share tips and tricks with each other.
Line 6: Line 7:
  
 
===Use tcmalloc/jemalloc instead of Glibc malloc===
 
===Use tcmalloc/jemalloc instead of Glibc malloc===
 +
{{warning|this is NOT recommended and may cause segfaults IF your piece of software statically links a malloc implementation. Doing it on a per-program basis is safer.}}
  
 
Glibc's malloc is not as performant or scalable as tcmalloc, or even jemalloc. You can expect some small to massive performance gains[https://github.com/blog/1422-tcmalloc-and-mysql <sup>1</sup>], depending on your workload, by forcing software to use your memory allocator of choice.
 
Glibc's malloc is not as performant or scalable as tcmalloc, or even jemalloc. You can expect some small to massive performance gains[https://github.com/blog/1422-tcmalloc-and-mysql <sup>1</sup>], depending on your workload, by forcing software to use your memory allocator of choice.
Line 17: Line 19:
 
... where * is either jemalloc, or tcmalloc.
 
... where * is either jemalloc, or tcmalloc.
  
'''Note:''' This is not recommended and may cause segfaults. Doing it on a per-program basis is safer. More on this later.
+
{{tip|<nowiki>to start a program once with your preferred implementation of malloc, issue LD_PRELOAD=/usr/lib/lib*.so program using the terminal.</nowiki>}}
  
 
==Xorg server==
 
==Xorg server==

Latest revision as of 06:49, 20 February 2022

Imbox deletion.png
Imbox deletion.png
DELETION CANDIDATE
Relevant discussion may be found on the talk page. Reason: This article only has two tweaks and could easily be merged with multiple other articles

This article was created for Linux users to share tips and tricks with each other.

General tweaks

Use tcmalloc/jemalloc instead of Glibc malloc

Warning: this is NOT recommended and may cause segfaults IF your piece of software statically links a malloc implementation. Doing it on a per-program basis is safer.

Glibc's malloc is not as performant or scalable as tcmalloc, or even jemalloc. You can expect some small to massive performance gains1, depending on your workload, by forcing software to use your memory allocator of choice.

To do this, use your preferred editor to create:

/etc/ld.so.preload
/usr/lib/lib*.so

... where * is either jemalloc, or tcmalloc.

Tip: to start a program once with your preferred implementation of malloc, issue LD_PRELOAD=/usr/lib/lib*.so program using the terminal.

Xorg server

Disable mouse acceleration in X

In order to disable mouse acceleration use your text editor of choice to create:

/etc/X11/xorg.conf.d/50-mouse-acceleration.conf
Section "InputClass"
  Identifier "My Mouse"
  Option "AccelerationNumerator" "1"
  Option "AccelerationDenominator" "1"
  Option "AccelerationThreshold" "0"
EndSection

Your config file will take effect the next time you start X.