LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-16-2017, 04:45 PM   #1
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Rep: Reputation: Disabled
Speedup tweaks


I found that if you edit fstab and grub you can decrease bootup times.

Edit fstab
1st line for root ( / ) at the end you should see 1 1 (or maybe 0 1).

Change the last digit to a zero and save.

Next, you need to edit GRUB.

Replace the "quiet splash" with one word "profile".

Reboot twice.

Things should boot up a bit faster.

Also, adding noatime to your /home partition can slightly speed things up a bit more.

example might be (some UUID) /home defaults 1 1
Change it to (some UUID) /home noatime,defaults 1 1

If the numbers following are not 1's then leave them alone and do not change them.

Don't change anything else.

Note: this assumes you are not fooling around with adding, removing, switching hard drives or messing with partitions.

In those events I suggest you do not do the above.
 
Old 03-16-2017, 06:07 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by yaminator View Post
Things should boot up a bit faster.
...like loading less services or using hibernation (unless you're in a brown-out-prone area w/o UPS or battery)?
 
Old 03-16-2017, 06:15 PM   #3
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hibernation can be a problem. Files in use cannot be updated when coming out of hibernation.

It does take a while to come out of hibernation if you have a lot of RAM.
 
Old 03-16-2017, 06:17 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by yaminator View Post
Hibernation can be a problem. Files in use cannot be updated when coming out of hibernation.
Never had that problem myself: examples welcome.


Quote:
Originally Posted by yaminator View Post
It does take a while to come out of hibernation if you have a lot of RAM.
%define a_lot?
 
Old 03-16-2017, 06:33 PM   #5
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Hibernation is a process whereby whatever you have in RAM is stored to the hard drive and later retrieved in the same state it was in before hibernation. If you have 8gb of active files in ram, it will take a while to save all that to disk. Some people prefer sleep mode for faster access. But even that will have files in use.

If you have something updated while files are in use, they aren't going to be replaced when hibernating or sleeping.

Files in use aren't replaced until reboot. If they were, the system could crash hence files are usually locked while in use. Or loaded into ram.

Try launching firefox. While it is running, go directly into it's folder and make some sort of change (deletion would be a good method of some file it needs).

Even deleting the whole folder while firefox is still running will still show firefox still running.

If you are brave enough, delete your FSTAB file while the computer is running. (not recommended for those who do not know about making a backup of it and how to restore the backup from command line)

The computer will still run until you restart.

Deleting say fstab and hibernating will still allow the computer to resume as if the file was never deleted.

Disclaimer - do the above at your own risk.
 
Old 03-16-2017, 06:35 PM   #6
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Never had that problem myself: examples welcome.



%define a_lot?
definition of 'a lot' - more than 'a little' lol

Presumption is 4 or more GB of ram but depends on the system.

For some people 1gb of ram is a lot. Others 32gb is a lot.
 
Old 03-17-2017, 01:25 AM   #7
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
My MSI GT72 6QD Dominator G laptop currently has 16GB ram.
I don't agree with anything you say yaminator.
It boots Windows 10 and Debian testing in 18 seconds or less, neither of which go into hibernation on shutdown as I disabled this default behavior in Windows, when I close the lid and put it into hibernation, no more than 15 seconds to a usable desktop, (because I wait for the blue tooth mouse to get paired, it could be faster for all I know).
When you look at the specs of this unit, you may be able to figure out why it's so fast.
My advice for you to get things up and running faster is, " upgrade your hardware ", and disable applications checking for updates upon startup, or applications being started automatically.

Last edited by Brains; 03-17-2017 at 01:45 AM. Reason: Added last 8 words or so
 
Old 03-17-2017, 02:14 AM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by yaminator View Post
I found that if you edit fstab and grub you can decrease bootup times.

Edit fstab
1st line for root ( / ) at the end you should see 1 1 (or maybe 0 1).

Change the last digit to a zero and save.
You should probably tell people what that actually does.

Last edited by dugan; 03-17-2017 at 02:15 AM.
 
Old 03-17-2017, 04:51 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
see man fstab:
Code:
       The sixth field (fs_passno).
              This  field is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.  The root filesystem should be specified with a fs_passno
              of 1, and other filesystems should have a fs_passno of 2.  Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at  the
              same  time  to  utilize parallelism available in the hardware.  If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem
              does not need to be checked.
 
Old 03-17-2017, 11:05 AM   #10
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thread isn't necessarily meant to be marked as solved. But if mods want it that way then it is fine with me.
Just wanted to post something that can speed up things a bit.

Others can add additional speedup tweaks if desired. May want to keep thread open for a week or two just in case.
 
Old 03-17-2017, 11:06 AM   #11
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Regarding file system checks at reboot - I assume that so long as you have a clean shutdown you shouldn't have any problems.

I did a forced shutdown (left battery out and unplugged power supply cord) and restarted with no apparent ill effects.
 
Old 03-17-2017, 11:59 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by yaminator View Post
Regarding file system checks at reboot - I assume that so long as you have a clean shutdown you shouldn't have any problems.

I did a forced shutdown (left battery out and unplugged power supply cord) and restarted with no apparent ill effects.
And you will be surprised later when you find "strange" things, unexpected behaviour, missing files, whatever.
 
Old 03-17-2017, 12:01 PM   #13
yaminator
LQ Newbie
 
Registered: Jan 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
And you will be surprised later when you find "strange" things, unexpected behaviour, missing files, whatever.
Not really. I had all that before the tweaks lol

I can always restore the settings or just R/R.
 
Old 03-17-2017, 05:20 PM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by pan64 View Post
see man fstab:
Code:
       The sixth field (fs_passno).
              This  field is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time.  The root filesystem should be specified with a fs_passno
              of 1, and other filesystems should have a fs_passno of 2.  Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at  the
              same  time  to  utilize parallelism available in the hardware.  If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem
              does not need to be checked.
so we're just skipping fsck?
which isn't run on every boot anyways, only every 10th or so?

an what's the "profile" boot option doing?
 
Old 04-08-2017, 07:27 PM   #15
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
build a custom kernel with all the device and file system (the ones you use) modules built into the kernel this saves the time it tacks to load the modules
you may need to add a kernel command line to configure the built in modules to your boot loader configuration
with
make localyesconfig
then tune the kernel with
make {your preferred kernel configuration tool}
make all
make install
add the new kernel to your boot loader configuration file as an option for testing
run the boot loader
test it reboot
if it works make it the default

this cut my boot time in half

Last edited by rob.rice; 04-08-2017 at 08:02 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yet another boot speedup patch for 14.2 SCerovec Slackware 28 08-19-2016 02:47 AM
Sendmail speedup rincewind Linux - Server 1 03-18-2007 08:26 PM
speedup download in linux boy_to_man Linux - Newbie 7 01-05-2007 03:58 AM
speedup SUSE 10 bnjmn1989 SUSE / openSUSE 2 10-26-2005 03:51 PM
PostgreSQL , how to speedup ? ? kernelvn Programming 3 09-22-2004 11:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration