====== Performances ======
{{indexmenu>:start:gnu-linux:performances#5}}
Sources:
* [[https://wiki.archlinux.org/index.php/Maximizing_performance|https://wiki.archlinux.org/index.php/Maximizing_performance]]
* Improving Performance - ArchWiki - https://wiki.archlinux.org/index.php/Improving_performance
* [[https://wiki.archlinux.org/index.php/Solid_State_Drives#Tips_for_maximizing_SSD_performance|https://wiki.archlinux.org/index.php/Solid_State_Drives#Tips_for_maximizing_SSD_performance]]
* [[https://upandclear.org/2017/01/26/linux-ssd-performances-et-preservation-trim-fichiers-en-ram-tmpfs/|https://upandclear.org/2017/01/26/linux-ssd-performances-et-preservation-trim-fichiers-en-ram-tmpfs/]]
* [[https://bbs.archlinux.org/viewtopic.php?id=118449|https://bbs.archlinux.org/viewtopic.php?id=118449]]
* Klaver.it - https://klaver.it/
* [[http://www.dsfc.net/logiciel-libre/linux/linux-booster-les-acces-en-lecture-a-vos-disques/|http://www.dsfc.net/logiciel-libre/linux/linux-booster-les-acces-en-lecture-a-vos-disques/]]
* [[https://blog.bandinelli.net/index.php?post/2015/06/07/Beau-fr%C3%A8re,-entropie-et-%C3%A9tablissement-de-connexion-SSH-lente|https://blog.bandinelli.net/index.php?post/2015/06/07/Beau-fr%C3%A8re,-entropie-et-%C3%A9tablissement-de-connexion-SSH-lente]]
* [[http://www.linuxpedia.fr/doku.php/debian/un_systeme_plus_reactif|http://www.linuxpedia.fr/doku.php/debian/un_systeme_plus_reactif]]
* [[https://github.com/Nefelim4ag/systemd-swap|https://github.com/Nefelim4ag/systemd-swap]]
* zRAM - https://www.linuxtricks.fr/wiki/zram-compresser-la-ram-au-lieu-de-swapper-sur-linux
* [[http://packages.ubuntu.com/fr/xenial/zram-config|http://packages.ubuntu.com/fr/xenial/zram-config]]
* réinject swap https://www.linuxtricks.fr/news/10-logiciels-libres/334-reinjecter-tout-le-swap-en-ram-sous-linux/
* [[https://buzut.fr/2016/05/27/optimiser-gestion-ressources-systeme-ulimit/|https://buzut.fr/2016/05/27/optimiser-gestion-ressources-systeme-ulimit/]]
* [[http://wiki.tuxunix.com/index.php/Optimisation_Linux|http://wiki.tuxunix.com/index.php/Optimisation_Linux]]
* [[http://wiki.tuxunix.com/index.php/Astuces|http://wiki.tuxunix.com/index.php/Astuces]]
* [[https://www.blackmoreops.com/2014/10/28/delete-clean-cache-to-free-up-memory-on-your-slow-linux-server-vps/|https://www.blackmoreops.com/2014/10/28/delete-clean-cache-to-free-up-memory-on-your-slow-linux-server-vps/]]
* [[http://wiki.debian.org/HowTo/CpuFrequencyScaling|http://wiki.debian.org/HowTo/CpuFrequencyScaling]]
* [[https://blog.vinilox.eu/|https://blog.vinilox.eu/]]
* [[https://wiki.debian.org/OpenRC|https://wiki.debian.org/OpenRC]]
* [[http://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/|http://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/]]
* [[http://geekeries.de-labrusse.fr/?p=3127|http://geekeries.de-labrusse.fr/?p=3127]]
* [[https://memo-linux.com/arch-linux-manjaro-optimiser-sa-machine-avec-linux-ck-et-mkinitcpio/|https://memo-linux.com/arch-linux-manjaro-optimiser-sa-machine-avec-linux-ck-et-mkinitcpio/]]
* [[https://itsfoss.com/productivity-tips-ubuntu/|https://itsfoss.com/productivity-tips-ubuntu/]]
* [[http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/|http://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/]]
* [[http://damiengustave.fr/lvm-creer-une-partition-mirror-a-partir-dune-partition-lineaire/|http://damiengustave.fr/lvm-creer-une-partition-mirror-a-partir-dune-partition-lineaire/]]
* [[http://www.cyrius.com/debian/nslu2/linux-on-flash/|http://www.cyrius.com/debian/nslu2/linux-on-flash/]]
* [[https://postblue.info/netbook-archlinux-i3-optimisation/|https://postblue.info/netbook-archlinux-i3-optimisation/]]
* [[https://github.com/postblue/dotfiles/|https://github.com/postblue/dotfiles/]]
* [[https://postblue.info/compaq-mini-700ef-arch-linux/|https://postblue.info/compaq-mini-700ef-arch-linux/]]
* [[https://github.com/fmarier/user-scripts/blob/master/startup|https://github.com/fmarier/user-scripts/blob/master/startup]] - voir mozilla
* [[http://web.archive.org/web/20160604025632/http://gtk-apps.org/content/show.php/newrez+-+Increase+Screen+Rez+For+Netbook?content=134686|http://web.archive.org/web/20160604025632/http://gtk-apps.org/content/show.php/newrez+-+Increase+Screen+Rez+For+Netbook?content=134686]]
* [[http://www.makeuseof.com/tag/how-to-disable-the-touchpad-while-you-are-typing/|http://www.makeuseof.com/tag/how-to-disable-the-touchpad-while-you-are-typing/]]
* [[http://www.2daygeek.com/atop-system-process-performance-monitoring-tool/|http://www.2daygeek.com/atop-system-process-performance-monitoring-tool/]]
* [[https://nos-oignons.net/wiki-admin/Proc%C3%A9dures/D%C3%A9ployer_un_n%C5%93ud_Tor/|https://nos-oignons.net/wiki-admin/Proc%C3%A9dures/D%C3%A9ployer_un_n%C5%93ud_Tor/]] voir etckeeper
* [[http://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/|http://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/]]
* [[http://www.webhostingtalk.com/showthread.php?t=257654|http://www.webhostingtalk.com/showthread.php?t=257654]]
* [[http://ilphrin.com/planet/2017/01/02/faire-marcher-une-carte-hybride-sous-linux.html|http://ilphrin.com/planet/2017/01/02/faire-marcher-une-carte-hybride-sous-linux.html]]
* [[http://linuxfr.org/users/gbetous/journaux/un-outil-fort-pratique-apt-cacher-ng|http://linuxfr.org/users/gbetous/journaux/un-outil-fort-pratique-apt-cacher-ng]]
* [[http://alterlibriste.free.fr/index.php?post/2017/03/06/Go-fsck-yourself|http://alterlibriste.free.fr/index.php?post/2017/03/06/Go-fsck-yourself]]
* powertop - https://askubuntu.com/questions/112705/how-do-i-make-powertop-changes-permanent
===== Systèmes =====
==== systemd ====
[[http://www.dsfc.net/logiciel-libre/linux/centos-linux-logiciel-libre/basculer-mode-graphique-mode-texte-systemd/|http://www.dsfc.net/logiciel-libre/linux/centos-linux-logiciel-libre/basculer-mode-graphique-mode-texte-systemd/]]
==== Booster les accès en lecture à vos disques ====
Sous Linux, la quantité de données lues à chaque accès et mises en cache est de 256 blocks x 512 octets :
''blockdev –getra /dev/sda''
Vous pouvez modifier ce paramètre avec la commande blockdev de manière à accélérer les accès en lecture à vos systèmes de fichiers :
''blockdev –setra 4096 /dev/sda''
Si la consommation mémoire risque d’augmenter à la marge, la charge CPU moyenne risque, elle, de diminuer légèrement. Et, si vous disposez de mémoire, n’hésitez pas à pousser ce paramètre.
Pour fixer le paramètre, ajoutez la commande à votre fichier /etc/rc.local, exécutée à chaque lancement de votre système :
//#Pour Fedora, CentOS, Red Hat, même si /sbin est un alias de /usr/sbin//
''/usr/sbin/blockdev –setra 4096 /dev/sda''
//#Pour Ubuntu Server, Debian//
''/sbin/blockdev –setra 4096 /dev/sda''
==== Augmenter l'entropie ====
Pour vérifier le stock d'entropie sur la machine :
''cat /proc/sys/kernel/random/entropy_avail''
Installer un démon pour récolter l'entropie :
''sudo aptitude install haveged''
et dès lors
''cat /proc/sys/kernel/random/entropy_avail''
==== Libérer de la ram (périodiquement) ====
Sur un serveur:
sudo crontab -e
0 4 * * * sync; /sbin/sysctl vm.drop_caches=1
Sur un client:
sudo crontab -e
*/10 * * * * sync; /sbin/sysctl vm.drop_caches=3
[[https://github.com/Nefelim4ag/systemd-swap|https://github.com/Nefelim4ag/systemd-swap]]
==== Configurer correctement son swap ====
[[https://www.linux.com/news/all-about-linux-swap-space|https://www.linux.com/news/all-about-linux-swap-space]]
==== sysctl.conf ====
* ArchWiki - https://wiki.archlinux.org/index.php/sysctl
* Old Ubuntu - https://www.ubuntugeek.com/performance-tuning-with-system-control-sysctl-in-ubuntu.html
* Ubuntu - https://rtcamp.com/tutorials/linux/sysctl-conf/
* Mellanox - https://community.mellanox.com/s/article/linux-sysctl-tuning
* tnt aufbix Wiki (2016) - https://tnt.aufbix.org/linux/sysctl
* Oracle - https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.0/administer/performance-tuning.html#GUID-A63F9189-C0D5-4B8F-8814-E2A56FC08D9E
* Unprecised gist - https://gist.github.com/voluntas/bc54c60aaa7ad6856e6f6a928b79ab6c
* High Performance Server - https://gist.github.com/JoeyBurzynski/a4359dd19b211e5c37b6fcd2eff67286
* Some explained value - https://community.mellanox.com/s/article/linux-sysctl-tuning
===== Matériels =====
==== SSD ====
* [[http://www.deltasight.fr/ssd-linux-guide-ultime/|http://www.deltasight.fr/ssd-linux-guide-ultime/]]
* [[https://wiki.debian.org/SSDOptimization|https://wiki.debian.org/SSDOptimization]]
* [[https://www.namhuy.net/1563/how-to-tweak-and-optimize-ssd-for-ubuntu-linux-mint.html|https://www.namhuy.net/1563/how-to-tweak-and-optimize-ssd-for-ubuntu-linux-mint.html]]
* [[http://wiki.freeswitch.org/wiki/SSD_Tuning_for_Linux#Linux_Tuning|http://wiki.freeswitch.org/wiki/SSD_Tuning_for_Linux#Linux_Tuning]]
* [[https://wiki.archlinux.org/index.php/Solid_State_Drives/Tips_and_tricks|https://wiki.archlinux.org/index.php/Solid_State_Drives/Tips_and_tricks]]
* [[https://wiki.archlinux.org/index.php/Solid_State_Drives#Maximizing_performance|https://wiki.archlinux.org/index.php/Solid_State_Drives#Maximizing_performance]]
* [[http://www.cybera.ca/news-and-events/tech-radar/kernel-settings-schedulers-and-solid-state-drives/|http://www.cybera.ca/news-and-events/tech-radar/kernel-settings-schedulers-and-solid-state-drives/]]
* https://www.techrepublic.com/article/how-to-check-ssd-health-in-linux/
* https://sebsauvage.net/wiki/doku.php?id=linux-ssd
* https://xanmod.org/#setting_the_fq-pie_qdisc
==== Graphics ====
* [[https://wiki.archlinux.org/index.php/Vulkan|https://wiki.archlinux.org/index.php/Vulkan]]
* [[https://debian-facile.org/viewtopic.php?id=14155|https://debian-facile.org/viewtopic.php?id=14155]]
* Vaapi - https://ultra-technology.org/linux_for_beginners/how-to-install-vaapi-vdpau-on-linux-debian-ubuntu/ ou https://nicolasguilloux.github.io/blade-shadow-beta/tweaks.html ou https://doc.ubuntu-fr.org/vaapi
==== SDCard ====
* [[http://taras.glek.net/post/Moto-Z-has-10x-less-lag-than-pixel/|http://taras.glek.net/post/Moto-Z-has-10x-less-lag-than-pixel/]]
* [[http://howtos.davidsebek.com/raspbian-jessie-installation.html|http://howtos.davidsebek.com/raspbian-jessie-installation.html]]
* [[http://whitehorseplanet.org/gate/topics/documentation/public/howto_ext4_to_f2fs_root_partition_raspi.html|http://whitehorseplanet.org/gate/topics/documentation/public/howto_ext4_to_f2fs_root_partition_raspi.html]]
==== Compilation distribuée ====
* http://blog.kfish.org/2010/06/speeding-up-cross-compiling-with-ccache.html
* [[https://postblue.info/compilation-distribuee-sur-un-reseau-local/|https://postblue.info/compilation-distribuee-sur-un-reseau-local/]]
* sudo iptables -A TCP -p tcp -s 192.168.0.0/24 --dport 3632 -m state --state NEW -m comment --comment "DistCC" -j ACCEPT
==== Audio ====
[[https://thenerdshow.com/audio.html|https://thenerdshow.com/audio.html]]
==== S.M.A.R.T ====
* [[https://www.guillaume-leduc.fr/surveillez-la-sante-de-vos-disques-sous-linux-avec-smartmontools.html|https://www.guillaume-leduc.fr/surveillez-la-sante-de-vos-disques-sous-linux-avec-smartmontools.html]]
* [[https://wiki.archlinux.org/index.php/S.M.A.R.T|https://wiki.archlinux.org/index.php/S.M.A.R.T]].
* [[https://blog.shadypixel.com/monitoring-hard-drive-health-on-linux-with-smartmontools/|https://blog.shadypixel.com/monitoring-hard-drive-health-on-linux-with-smartmontools/]]
==== Automatisation ====
* [[https://www.admin-linux.fr/inotify-incron-lancer-une-commande-en-cas-daction-sur-un-fichierun-repertoire/|https://www.admin-linux.fr/inotify-incron-lancer-une-commande-en-cas-daction-sur-un-fichierun-repertoire/]]
* [[http://linuxfr.org/news/exploiter-inotify-c-est-simple|http://linuxfr.org/news/exploiter-inotify-c-est-simple]]
==== Coupler les connexion internet ====
[[https://github.com/Morhaus/dispatch-proxy|https://github.com/Morhaus/dispatch-proxy]]
==== Entropie ====
http://www.deltasight.fr/entropie-linux-generation-nombres-aleatoires/