Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

HOWTO: Speeding up Debian

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
Lou
Posts: 1739
Joined: 2006-05-08 02:15

#101 Post by Lou »

I never knew that, thx!
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

User avatar
diego1116
Posts: 352
Joined: 2007-03-28 17:49
Location: Santa Maria, RS, Brazil

#102 Post by diego1116 »

If you don't want "cron" running all the time, I think you can switch to "anacron" (I never tried it though):

http://packages.debian.org/stable/admin/anacron
Package: anacron (2.3-13)
cron-like program that doesn't go by time

Anacron (like `anac(h)ronistic') is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously. It can therefore be used to control the execution of daily, weekly and monthly jobs (or anything with a period of n days), on systems that don't run 24 hours a day. When installed and configured properly, Anacron will make sure that the commands are run at the specified intervals as closely as machine-uptime permits.

This package is pre-configured to execute the daily jobs of the Debian system. You should install this program if your system isn't powered on 24 hours a day to make sure the maintenance jobs of other Debian packages are executed each day.
http://anacron.sourceforge.net/
What is Anacron not?

Anacron is not an attempt to make cron redundant. It cannot be used to schedule commands at intervals smaller than days. It also does not guarantee that the commands will be executed at any specific day or hour.

It isn't a full-time daemon. It has to be executed from boot scripts, from cron-jobs, or explicitly.

synss
Posts: 28
Joined: 2007-06-22 15:35
Location: Japan

#103 Post by synss »

Hello all, I think these were not mentioned here (but sure were at other places):

link /bin/sh to /bin/dash

dash is a lightweight POSIX shell, /bin/sh is called via the shebang (#!/bin/sh) by most shell scripts, calling a lighter shell will make it start faster, makes a difference on boot up. Ubuntu has that by default.

I like putting /tmp and /var/run on tmpfs, tmpfs is like using part of your ram as a file system

Code: Select all

/etc/fstab
...
tmpfs   /tmp   tmpfs   defaults 0 0
tmpfs   /var/run   tmpfs   defaults 0 0
you can achieve the same with mount --bind to /dev/shm and it is actually very nice to have a rc script to mount tmpfs on /dev/shm as should be, create directories in it and mount bind /tmp and /var/run (and $HOME/my-tmp) in there.

EDIT: note that I also have /var/lock and /var/log on there, /var/log is not recommended, because the logs will be lost if something goes wrong and the computer shuts down. But I am using a laptop, so I do not care much about the logs anyway.

Also, putting all that on tmpfs requires a bit of tweaking in the init.d stuff or /etc/syslog.conf to get rid of error messages, things like
[ ! -d /var/run/screen ] && exit 0
and the like.
END OF EDIT


now about cron anacron and atd

Another thing is cron, anacron and atd are NOT the same thing!
1. you want cron, period
2. anacron is not a daemon, and removing it is not a good idea: either your system is always up, in which case it is never executed (so nothing changes whether it is there or not) or you shutdown your laptop/workstation, in which case, cron will fail to, say, update you man page index or locate at 3am and you need anacron to do it
3. at it extremely useful on shared workstation, I mean, computers you send jobs to for number crunching, it is not useful for any other case, AFAIK. at is such that it executes a job you have sent it when it can, meaning, when some other job has finished executing and frees enough CPUs for the next job.
=> It is awesome when you need it, if you do not know what it is you do not need it.
Last edited by synss on 2007-06-25 09:31, edited 1 time in total.

User avatar
chrismortimore
Posts: 849
Joined: 2007-04-24 06:34
Location: Edinburgh, UK

#104 Post by chrismortimore »

synss wrote:now about cron anacron and atd

Another thing is cron, anacron and atd are NOT the same thing!
Skip back to page 4, it's been said already: http://forums.debian.net/viewtopic.php?p=69922#69922
Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 5x320GB WD 7200rpm Caviar RE2 (RAID5), Nvidia 6600GT 256MB
Laptop: Intel Pentium M 1.5GHz, 512MB PC2700, 60GB 5400rpm IBM TravelStar, Nvidia 5200Go 64MB

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#105 Post by Lou »

While googling for something else i ran into this. Some tips are in this thread, some are not, good read anyhow.

Optimizing Desktop Performance Part 1
http://www.linuxjournal.com/article/8308

Part 2
http://www.linuxjournal.com/article/8317

Part 3
http://www.unix-tutorials.com/go.php?id=331
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

User avatar
craigevil
Posts: 5391
Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times

#106 Post by craigevil »

System tweaking :: sidux.com :: debian based live cd development
http://sidux.com/index.php?module=pnWikka&tag=tweaking

The part about deborphan is the only part I wouldn't suggest using if you run Sid.

Using OpenDNS and the internet tweak part along with all the IW tweaks I use has made my internet just fly.

"preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times."
http://sourceforge.net/projects/preload

Preload used along with prelink, means even apps like OpenOffice and Firefox load in around 2-3 seconds.

My total boot time on a cold boot is under 30 seconds to the KDE desktop.
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list

User avatar
Bro.Tiag
Posts: 1924
Joined: 2007-06-02 19:14

#107 Post by Bro.Tiag »

craigevil wrote:My total boot time on a cold boot is under 30 seconds to the KDE desktop.
That is impressive, IMO, since my best boot time is 22 Seconds on a netinstall, no login, Sid running e17 w/ a few odds & ends.

Cheers

andrek
Posts: 3
Joined: 2007-07-13 12:50
Location: Poland

#108 Post by andrek »

Hi,

Well after applying those patches, my debian sid doesn't boot faster. However, I saw recently that 'ReiserFS: checking transaction log' takes loong time ( about 30sec. ). What's wrong?
Anyway, I tried to remove gdm from my system.. it also wants to uninstall gnome-desktop-environment which means it will also delete many many gnome programs.. which kinda sucks ;)
Here's my fstab file

Code: Select all

/dev/hda8       /               reiserfs defaults        0       1
/dev/hda6       /boot           reiserfs notail          0       2
/dev/hda9       /home           reiserfs defaults,noatime,nodev,nosuid        0       2
/dev/hda7       none            swap    sw              0       0
I'm also thinking about reinstalling debian using something like minimal-install. What file systems would you recommend to get high speed?

synss
Posts: 28
Joined: 2007-06-22 15:35
Location: Japan

#109 Post by synss »

it also wants to uninstall gnome-desktop-environment
My understanding of Debian package management and its gnome related thing is that you can remove gnome-desktop-environment and you can keep the packages you want by saying they were installed manually, in aptitude, go to the >installed packages >gnome branch and use m (for manually installed --- will not be removed as a dependency of gnome-desktop-env) or M for automatically installed (and therefore automatically removed) packaged. You will see an A in the third field for auto-removable packages.

By the way, most (if not all) of the libs and libdevel should be auto-removable (and let them go if you change the flag and it says they are to be removed) as they probably were all installed as dependencies of other things.

Doing this will bring you to the same point as reinstalling from scratch and adding the packages you explicitly want, just done the other way round. Hence, you keep a working system.

andrek
Posts: 3
Joined: 2007-07-13 12:50
Location: Poland

#110 Post by andrek »

What file system would you recommend to get as much boot speed as possible? I'm going to install debian from a netinst cd.

User avatar
DeanLinkous
Posts: 1570
Joined: 2006-06-04 15:28

#111 Post by DeanLinkous »

ext2

synss
Posts: 28
Joined: 2007-06-22 15:35
Location: Japan

#112 Post by synss »

1. do not reboot (this is linux, you know)
2. s2ram
3. ext2/3

andrek
Posts: 3
Joined: 2007-07-13 12:50
Location: Poland

#113 Post by andrek »

What do you mean by 'do not reboot'?
I'm actually dualbooting debian and windows xp ( my sister is using windows ) and sometimes I just have to reboot as I need to switch to windows..
Also, what's s2ram ? Could you explain in few words, please? :) As I have only 512Mb of RAM, I don't think to do any operations with it, but i'm just a newbie here
and thanks, according to your advice, I'll use ext2 as my fs. :roll:

And oh, according to these diagrams http://linuxgazette.net/102/piszcz.html , jfs is better than ext2. Is it really worth to apply ext2 as my filesystem and will it be faster? I don't really care about recovery procedures or other server sh.. things, since I'm a plain desktop user. I keep my important data on windows partitions / memory stick.

Sorry for many edits, but..
Is it worth to compile a kernel by myself? I mean, turning off many useless modules would increase speed?

THANKS synss
Last edited by andrek on 2007-07-13 15:58, edited 1 time in total.

synss
Posts: 28
Joined: 2007-06-22 15:35
Location: Japan

#114 Post by synss »

What do you mean by 'do not reboot'?
I mean there is generally no need to reboot a linux machine apart from using a new kernel. This is by far the fastest way to "boot", boot once every 2 years.
Also, what's s2ram
suspend to ram, but you'll need the ram for windows. But you can use suspend-to-disk, and suspend on your swap. This is possibly faster than a cold boot. suspend2 is supposed to be faster than swsusp. I do not know, I use s2ram (suspend to ram, the default one).
Is it really worth to apply ext2 as my filesystem and will it be faster?
No. Buy a faster hard drive.

You could also possibly try some usermode or colinux or cygwin, etc. and keep linux in Windows. Or convert your sister to linux. I just hate dual boot.


And this is going off topic, open a new thread.

User avatar
regeya
Posts: 11
Joined: 2004-09-18 00:11

#115 Post by regeya »

[quote="Lou"]
2. Once a week, i do:
# wajig orphans
# wajig purge-orphans
# wajig clean/quote]

I just ran 'wajig orphans' and one of the few things it came up with was this:

Code: Select all

libc6-i686
Thank you, but no. Anything that thinks an ESSENTIAL library is an orphan is dangerous.
But let us not rail about justice as long as we have arms and the freedom to use them.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

#116 Post by Bulkley »

Essential for 686 machines. I bet that if you do a search you have another variation of libc6.

User avatar
Telemachus
Posts: 4574
Joined: 2006-12-25 15:53
Been thanked: 2 times

#117 Post by Telemachus »

Regeya wrote:Thank you, but no. Anything that thinks an ESSENTIAL library is an orphan is dangerous.
For what it's worth, that's not Wajig's fault. It's deborphan telling Wajig what the orphans are. I've had deboprhan telling me the same thing for some time now, and as Bulkley said, I do have more than one version of libc6 installed. I still haven't removed the 686 version, since I'm just not sure what of my software is linked against it. I use deborphan very very carefully, since it often has false positives in my experience (especially when it comes to multimedia libraries from mplayer or vlc or the like).

User avatar
hellfire[bg]
Posts: 499
Joined: 2006-06-21 19:15
Location: Sliven, Bulgaria

#118 Post by hellfire[bg] »

After following the advices (well most of them) in this thread my results are: booting to gdm - 35s, from gdm to a GNOME session - 15s, totally - 50s. After my default netinstall (just a base system, no X, no DE) it was about 30s. My machine is Celeron M420 1.6Ghz 1Mb L2 Cache, 1GB ram, 540rpm hard drive (this is a notebook). After boot the system is very responsive, and feels quite fast. What do you think of it?
...to boldly go where no one has gone before...

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

#119 Post by plugwash »

afaict libc6-i686 is just an extra optimised version of libc6 that will be used if installed and an appropriate processor is present. I don't belive it is in any way essential.

Lou
Posts: 1739
Joined: 2006-05-08 02:15

#120 Post by Lou »

This tip is from anticapitalista in the AntiX forums:

"add these 2 lines to the end of your /etc/sysctl.conf file

vm.swappiness=1
vm.vfs_cache_pressure=50

Save and restartX ie login again and see if apps open faster especially abiword, gnumeric, iceweasel etc.

If you get problems, you can simply remove the 2 lines."

Thanks anti.
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

Post Reply