SlideShare a Scribd company logo
1 of 20
Download to read offline
Hashstyling &Prelinks

  Horsepower your Linux system
What “distro” do you use?
   Ubuntu
   Slackware
   Debian
   Fedora
   BSD!!
   Gentoo!!!!!
Is your box sleepy!!
   If you have to wait for a program to start then you
    better be using windows……..
   How much time does KDE or Firefox take to load??
   Let’s give some power pills to your box

                               I look sick!!!
                               Nah
Here are the pills……
   Hastyling
•   you got to compile to hash style, preferably Gentoo
    or BSD



 Prelinks
 Will work on any distro, but 64bit will be voila…
What are Prelinks???
   Well there are libraries to be loaded at startup of a
    program…
   Most of them are shared with other programs
   Thus a lot of symbolic references needs to be
    resolved while startup.
   This is fast for smaller programs, but
   For programs like open office and Firefox- Pain
   My open office writer takes 20sec to load before
    prelinking and 11 after….
   Firefox takes <3 in place of 9
   Not to mention KDE loading at all( you time that)
Prelinks drawbacks
   You need to re-prelink every time you update your
    libraries or anything.
   Size of executables increases( just penalty on space
    though)
   It’s static. Libraries are bonded to the executables, It
    doesn’t work with dynamically loaded libraries
   So, the improvement in programs like open office is
    far lesser…
   Don’t worry…… Just keep following
Doing it with style: Hashstlye
   The new improvement in binutils and glibc called
    direct linking or –Bdirect is the next improvement in
    the field of faster computing.
   Careful… It’s still under development and not
    officially adopted.
   With Hashstyling people(l33t ones!!) have seen 50%
    improvements in dynamic linking , as in load times
   All of this is owing to new improvements in the new
    DT_GNU_HASH or gnu.hash. The older version was
    .hash.
How to prelink?
   It’s basically same in all distros
   Emerge or apt-get or yast or yum anything you use
   Just install “prelink”
   Run this command
   #prelink –amfRv
    a = all packages
    m = Conserve the virtual memory space
    f = force linking
   R = Random – randomize the address ordering, this
    enhances security against buffer overflows.
    v = I won’t tell that( no price for guessing either!)
Enhance KDE
   What you did on the last page was good enough to
    see the power, but some more tweaking is no harm
   Set KDE_IS_PRELINKED=quot;truequot; in
    /etc/env.d/*kdepaths* to inform KDE about the
    prelinking.
   Prelink cronjob: Set it up as a cron job, if you keep
    updating your libraries
   Generally not required for quarterly updaters
Just in case : if you don’t like it
   To remove prelinks:
   Remove the prelink cronjob
   Run $prelink –au
   Just uninstall it as you do for any other software
   Gentooers $ emerge –aC prelink

   And there are gentoo forums and irc channels to
    discuss any meshups( and there will be!!) you
    encounter
Hashstyling: Gentoo only
   Get THE latest version of binutils , glibc and
    gcc(4.2+) .( edit package.keywords)
   Follow the steps in order:
   1) emerge binutils
    $ binutils-config -l
    $ binutils-config # (Replace # with the
    corresponding number to binutils-2.17.50.0.3)
    $ emerge glibc
Edit make.conf
   Open /etc/make.conf and make this entry exactly
    with NO SPACES what so ever.
   LDFLAGS=quot;-Wl,--hash-style=both“
   If you already use some LD flags, change them and
    input these.
   Now we will rebuild the system with these new flags.
   $emerge –e world
   $emerge prelink
   $prelink –amfRv
Crosscheck
   Just run this on the executable you want to check
   $ readelf -a /usr/bin/nano | grep GNU_HASH
     [ 4] .gnu.hash GNU_HASH 00000000004009a0           000009a0
    0x000000006ffffef5              (GNU_HASH)           0x4009a0

More information on http://www.gentoo.org/doc/en/prelink-howto.xml


   Please ensure you are emerging binutils >=
    2.17.50.0.3
   That’s it guys: You have a very fast system now,
    but don’t go and mess with a “l33t” guy yet.
    There are other ways of improving performance.
Upgrade from patch to newer version
   In case you have an old hashstyled system which
    was based on patches then follow exactly, or good
    luck restarting the whole process again
   Remove -Wl,--hash-style from LDFLAGS
   Get the latest overlay from the svn
   Run
   $ LD_X=1 emerge -1 coreutils binutils glibc
   Add -Wl,--hash-style=both to LDFLAGS again
   Run:
   $ LD_X=1 emerge -e world
Continued
   Emerge prelink
   Prelink –amfRv
   Do not turn off power during the whole process
   That’s it
   In case…..System crashed!! Rebuild or go dig
    Gentoo forums

 I haven’t tested it, but a gentoo veteran have:
http://gentoo-wiki.com/User:Roderick
Gentoo hashstlye thread
   http://forums.gentoo.org/viewtopic-t-475538.html

   You may find the solutions to all your problems here,
   If you don’t post one….
Some glichy packages
   X11-drm
   Maadwifi-ng

   While compiling these packages just comment
    LDFLAGS in make.conf
The next level……
   Hope you have your CHOST and CFLAGS and USE
    flags right
   Don’t you dare use anything below i686
   Add “ –O2 –march=<your-cpu> -fomit-frame-pointer”
   MAKEOPTS =“-j?” Google for your processor
   If you arte having more than one system give a look
    to distcc
   And ya ccache
   Above two will save a lot of compile time.
Wanna ask something…..




   I know you have lot of question, just throw them,
    answer is NOT guaranteed 
If you have time go Gentoo…




             Thanks!!!

More Related Content

What's hot

Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Antoine Cœur
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Michele Orselli
 
Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachineNick Galbreath
 
Newgenlib Installation on Ubuntu 12.04
Newgenlib Installation on Ubuntu 12.04Newgenlib Installation on Ubuntu 12.04
Newgenlib Installation on Ubuntu 12.04Rajendra Singh
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVNLorna Mitchell
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleOrestes Carracedo
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environmentSoshi Nemoto
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandJeremy Gimbel
 
Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Jeff Geerling
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleMichael Bahr
 

What's hot (20)

Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Os Whitaker
Os WhitakerOs Whitaker
Os Whitaker
 
SVN essentials
SVN essentialsSVN essentials
SVN essentials
 
C++ Production Debugging
C++ Production DebuggingC++ Production Debugging
C++ Production Debugging
 
Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016Cocoa tip for Cocoaheads Shanghai February 2016
Cocoa tip for Cocoaheads Shanghai February 2016
 
Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))Vagrant for real codemotion (moar tips! ;-))
Vagrant for real codemotion (moar tips! ;-))
 
Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachine
 
Newgenlib Installation on Ubuntu 12.04
Newgenlib Installation on Ubuntu 12.04Newgenlib Installation on Ubuntu 12.04
Newgenlib Installation on Ubuntu 12.04
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
 
VS Debugging Tricks
VS Debugging TricksVS Debugging Tricks
VS Debugging Tricks
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
 
A Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can UnderstandA Docker-based Development Environment Even I Can Understand
A Docker-based Development Environment Even I Can Understand
 
Node.js essentials
 Node.js essentials Node.js essentials
Node.js essentials
 
Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017Drupal VM for Drupal 8 Dev - MidCamp 2017
Drupal VM for Drupal 8 Dev - MidCamp 2017
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Holding a mule flow
Holding a mule flowHolding a mule flow
Holding a mule flow
 

Viewers also liked

Being a sustainable learner
Being a sustainable learnerBeing a sustainable learner
Being a sustainable learnerjanmulreany
 
Supporting the vision
Supporting the visionSupporting the vision
Supporting the visionjanmulreany
 
Primetime permaculture
Primetime permaculturePrimetime permaculture
Primetime permaculturejanmulreany
 
Marcos Ton Curriculum, Resume e Referências Linkedin
Marcos Ton Curriculum, Resume e Referências LinkedinMarcos Ton Curriculum, Resume e Referências Linkedin
Marcos Ton Curriculum, Resume e Referências LinkedinMarcos Ton Coaching
 

Viewers also liked (8)

Garden project
Garden projectGarden project
Garden project
 
QCBT Retreat
QCBT RetreatQCBT Retreat
QCBT Retreat
 
Bioregionalism
BioregionalismBioregionalism
Bioregionalism
 
Being a sustainable learner
Being a sustainable learnerBeing a sustainable learner
Being a sustainable learner
 
Supporting the vision
Supporting the visionSupporting the vision
Supporting the vision
 
Primetime permaculture
Primetime permaculturePrimetime permaculture
Primetime permaculture
 
Alg case study
Alg case study Alg case study
Alg case study
 
Marcos Ton Curriculum, Resume e Referências Linkedin
Marcos Ton Curriculum, Resume e Referências LinkedinMarcos Ton Curriculum, Resume e Referências Linkedin
Marcos Ton Curriculum, Resume e Referências Linkedin
 

Similar to Optimize Linux Performance with Hashstyling and Prelinking

Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalChad Woolley
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swposcon2007
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Levente Kurusa
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)Ruoshi Ling
 
Step-by-Step Introduction to Apache Flink
Step-by-Step Introduction to Apache Flink Step-by-Step Introduction to Apache Flink
Step-by-Step Introduction to Apache Flink Slim Baltagi
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual InfrastructureBryan McLellan
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Libraryjeresig
 
Distributed Compiler Icecc
Distributed Compiler IceccDistributed Compiler Icecc
Distributed Compiler IceccSZ Lin
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureJérôme Petazzoni
 
Lightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFSLightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFSJérôme Petazzoni
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureMichaël Lopez
 
Steps to Create odbc connection linux
Steps to Create odbc connection linuxSteps to Create odbc connection linux
Steps to Create odbc connection linuxOsama Mustafa
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Carlos Eduardo
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool boxbpowell29a
 
Using Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled WorldUsing Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled WorldFrank Hunleth
 

Similar to Optimize Linux Performance with Hashstyling and Prelinking (20)

Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
 
Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!Linux Kernel - Let's Contribute!
Linux Kernel - Let's Contribute!
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
Step-by-Step Introduction to Apache Flink
Step-by-Step Introduction to Apache Flink Step-by-Step Introduction to Apache Flink
Step-by-Step Introduction to Apache Flink
 
Virtual Infrastructure
Virtual InfrastructureVirtual Infrastructure
Virtual Infrastructure
 
An introduction to SVN
An introduction to SVNAn introduction to SVN
An introduction to SVN
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Distributed Compiler Icecc
Distributed Compiler IceccDistributed Compiler Icecc
Distributed Compiler Icecc
 
Introduction to Docker and deployment and Azure
Introduction to Docker and deployment and AzureIntroduction to Docker and deployment and Azure
Introduction to Docker and deployment and Azure
 
Lightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFSLightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFS
 
Chef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructureChef - industrialize and automate your infrastructure
Chef - industrialize and automate your infrastructure
 
Steps to Create odbc connection linux
Steps to Create odbc connection linuxSteps to Create odbc connection linux
Steps to Create odbc connection linux
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Docker and the Oracle Database
Docker and the Oracle DatabaseDocker and the Oracle Database
Docker and the Oracle Database
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Using Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled WorldUsing Erlang in an Embedded and Cross-Compiled World
Using Erlang in an Embedded and Cross-Compiled World
 
Ndp Slides
Ndp SlidesNdp Slides
Ndp Slides
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Optimize Linux Performance with Hashstyling and Prelinking

  • 1. Hashstyling &Prelinks Horsepower your Linux system
  • 2. What “distro” do you use?  Ubuntu  Slackware  Debian  Fedora  BSD!!  Gentoo!!!!!
  • 3. Is your box sleepy!!  If you have to wait for a program to start then you better be using windows……..  How much time does KDE or Firefox take to load??  Let’s give some power pills to your box I look sick!!! Nah
  • 4. Here are the pills……  Hastyling • you got to compile to hash style, preferably Gentoo or BSD  Prelinks  Will work on any distro, but 64bit will be voila…
  • 5. What are Prelinks???  Well there are libraries to be loaded at startup of a program…  Most of them are shared with other programs  Thus a lot of symbolic references needs to be resolved while startup.  This is fast for smaller programs, but  For programs like open office and Firefox- Pain  My open office writer takes 20sec to load before prelinking and 11 after….  Firefox takes <3 in place of 9  Not to mention KDE loading at all( you time that)
  • 6. Prelinks drawbacks  You need to re-prelink every time you update your libraries or anything.  Size of executables increases( just penalty on space though)  It’s static. Libraries are bonded to the executables, It doesn’t work with dynamically loaded libraries  So, the improvement in programs like open office is far lesser…  Don’t worry…… Just keep following
  • 7. Doing it with style: Hashstlye  The new improvement in binutils and glibc called direct linking or –Bdirect is the next improvement in the field of faster computing.  Careful… It’s still under development and not officially adopted.  With Hashstyling people(l33t ones!!) have seen 50% improvements in dynamic linking , as in load times  All of this is owing to new improvements in the new DT_GNU_HASH or gnu.hash. The older version was .hash.
  • 8. How to prelink?  It’s basically same in all distros  Emerge or apt-get or yast or yum anything you use  Just install “prelink”  Run this command  #prelink –amfRv  a = all packages  m = Conserve the virtual memory space  f = force linking  R = Random – randomize the address ordering, this enhances security against buffer overflows.  v = I won’t tell that( no price for guessing either!)
  • 9. Enhance KDE  What you did on the last page was good enough to see the power, but some more tweaking is no harm  Set KDE_IS_PRELINKED=quot;truequot; in /etc/env.d/*kdepaths* to inform KDE about the prelinking.  Prelink cronjob: Set it up as a cron job, if you keep updating your libraries  Generally not required for quarterly updaters
  • 10. Just in case : if you don’t like it  To remove prelinks:  Remove the prelink cronjob  Run $prelink –au  Just uninstall it as you do for any other software  Gentooers $ emerge –aC prelink  And there are gentoo forums and irc channels to discuss any meshups( and there will be!!) you encounter
  • 11. Hashstyling: Gentoo only  Get THE latest version of binutils , glibc and gcc(4.2+) .( edit package.keywords)  Follow the steps in order:  1) emerge binutils  $ binutils-config -l  $ binutils-config # (Replace # with the corresponding number to binutils-2.17.50.0.3)  $ emerge glibc
  • 12. Edit make.conf  Open /etc/make.conf and make this entry exactly with NO SPACES what so ever.  LDFLAGS=quot;-Wl,--hash-style=both“  If you already use some LD flags, change them and input these.  Now we will rebuild the system with these new flags.  $emerge –e world  $emerge prelink  $prelink –amfRv
  • 13. Crosscheck  Just run this on the executable you want to check  $ readelf -a /usr/bin/nano | grep GNU_HASH [ 4] .gnu.hash GNU_HASH 00000000004009a0 000009a0 0x000000006ffffef5 (GNU_HASH) 0x4009a0 More information on http://www.gentoo.org/doc/en/prelink-howto.xml  Please ensure you are emerging binutils >= 2.17.50.0.3  That’s it guys: You have a very fast system now, but don’t go and mess with a “l33t” guy yet. There are other ways of improving performance.
  • 14. Upgrade from patch to newer version  In case you have an old hashstyled system which was based on patches then follow exactly, or good luck restarting the whole process again  Remove -Wl,--hash-style from LDFLAGS  Get the latest overlay from the svn  Run  $ LD_X=1 emerge -1 coreutils binutils glibc  Add -Wl,--hash-style=both to LDFLAGS again  Run:  $ LD_X=1 emerge -e world
  • 15. Continued  Emerge prelink  Prelink –amfRv  Do not turn off power during the whole process  That’s it  In case…..System crashed!! Rebuild or go dig Gentoo forums  I haven’t tested it, but a gentoo veteran have: http://gentoo-wiki.com/User:Roderick
  • 16. Gentoo hashstlye thread  http://forums.gentoo.org/viewtopic-t-475538.html  You may find the solutions to all your problems here,  If you don’t post one….
  • 17. Some glichy packages  X11-drm  Maadwifi-ng  While compiling these packages just comment LDFLAGS in make.conf
  • 18. The next level……  Hope you have your CHOST and CFLAGS and USE flags right  Don’t you dare use anything below i686  Add “ –O2 –march=<your-cpu> -fomit-frame-pointer”  MAKEOPTS =“-j?” Google for your processor  If you arte having more than one system give a look to distcc  And ya ccache  Above two will save a lot of compile time.
  • 19. Wanna ask something…..  I know you have lot of question, just throw them, answer is NOT guaranteed 
  • 20. If you have time go Gentoo… Thanks!!!