PDA

View Full Version : How to improve system speed?



rich52
6th June 2012, 02:34 AM
I running KDE F17 on a 6-core AMD with 16-gig ram with 2-hard drives using volume management . Video card is a Nvidia 520 with 2 gig ram.

What services should I turn off on the system to speed up the boot and launch times? I'm sure I've got too many services running in the background that need to be turned off. Any way to maximize the physical usage of all physical 'ram' on the system? The swap drive partition on the hard drive see's very very little usage.

Any idea's, helpful suggestions will be appreciated. I always interested in running a 'mean' and 'lean' running machine that offers the best in performance.

Rich

Mariusz W
6th June 2012, 03:38 AM
I running KDE F17 on a 6-core AMD with 16-gig ram with 2-hard drives using volume management .

(...)

Any idea's, helpful suggestions will be appreciated. I always interested in running a 'mean' and 'lean' running machine that offers the best in performance.

Your declaration doesn't square well with running KDE. Did yo consider using another desktop environment (e.g., fluxbox, Openbox)?

ah7013
6th June 2012, 03:42 AM
Maybe try disabling Nepomuk/Strigi?

marko
6th June 2012, 05:18 PM
Run


systemd-analyze blamethen selectively disable those top time using services you're not using, frequent ones to remove:


sendmail.service
sm-client.service
lvm2-monitor.service (you don't need this if you don't use LVM )

There are lists on the forum and in google about which ones you can drop

sea
6th June 2012, 05:24 PM
I guess he uses lvm, as he stated:
with 2-hard drives using volume management .

marko
6th June 2012, 05:41 PM
I guess he uses lvm, as he stated:

The only good way is to run the systemd-analyze and take the top few time hogs and research which ones you can turn off. I think google searches will turn up some good blog posts that run through some good ones to remove for most people, this page is pretty good:

http://freedesktop.org/wiki/Software/systemd/Optimizations

I don't recommend his bullet 2 (removing usage of initrd) I tried that and got an non-booting system

Fenrin
6th June 2012, 05:48 PM
Fedora 17 Boot Optimization (from 15 to 2.5 seconds) (http://www.harald-hoyer.de/personal/blog/fedora-17-boot-optimization-from-15-to-3-seconds)

I didn't follow this guide yet. Better you try it first and if it works without big disadvantages I might give it a try somewhen :p

stevea
6th June 2012, 06:28 PM
I running KDE F17 on a 6-core AMD with 16-gig ram with 2-hard drives using volume management . Video card is a Nvidia 520 with 2 gig ram.

What services should I turn off on the system to speed up the boot and launch times? I'm sure I've got too many services running in the background that need to be turned off. Any way to maximize the physical usage of all physical 'ram' on the system? The swap drive partition on the hard drive see's very very little usage.

Any idea's, helpful suggestions will be appreciated. I always interested in running a 'mean' and 'lean' running machine that offers the best in performance.

Rich


Yes use systemd-analyze blame and systemd-analyze plot > /tmp/foo ; firefox /tmp/foo to see WHERE The tourble is (if anywhere).

BUT be VERY VERY careful about that "boot in under 3 seconds" link. It will not work for your "volume management" if you mean LVM and it will destroy system security.

Start by listing the services enabled and stop any that you are certain you don't need.
No one can decide for you. Do you need or want sendmail ? Do you need or want NFS ?

Install the package systemd-gtk and try the systemadm gui instead of systemctl.

sillav
6th June 2012, 06:55 PM
I running KDE F17 on a 6-core AMD with 16-gig ram with 2-hard drives using volume management . Video card is a Nvidia 520 with 2 gig ram.

What services should I turn off on the system to speed up the boot and launch times? I'm sure I've got too many services running in the background that need to be turned off. Any way to maximize the physical usage of all physical 'ram' on the system? The swap drive partition on the hard drive see's very very little usage.

Any idea's, helpful suggestions will be appreciated. I always interested in running a 'mean' and 'lean' running machine that offers the best in performance.

Rich

What a world we live in, where the above specs still feel sluggish to the op. Can you imagine openbox or fluxbox on such a machine? Openbox feels instantaneous on a celeron with 512 mb. It would likely be prescient on that machine.

You can delete unnecessary packages, disable some services and tweak some gnome settings. You can tune your swappiness to maximize the use of ram, though, to be honest, I have 3 GB and gnome uses about 298 mb booted up and ready to go. Only time I use all my ram is encoding or gimping. So do some stuff like that to maximize it :)

stevea
6th June 2012, 07:15 PM
What a world we live in, where the above specs still feel sluggish to the op. Can you imagine openbox or fluxbox on such a machine? Openbox feels instantaneous on a celeron with 512 mb. It would likely be prescient on that machine.

Agreed about openbox, and lxde feeling instantaneous. xfce only a little slower. I've seen instances where Gnome takes 15+ seconds from password to a ready screen on reasonably fast hardware; but that's the price they pay for EXcess.

BUT note he says it's a little slow booting and launching.


You can delete unnecessary packages, disable some services and tweak some gnome settings. You can tune your swappiness to maximize the use of ram, though, to be honest, I have 3 GB and gnome uses about 298 mb booted up and ready to go. Only time I use all my ram is encoding or gimping. So do some stuff like that to maximize it :)

delete unnecessary packages = NO speed impact.
disable some service = Yes that's the main issue.
No idea if there are any gnome settings that improve speed.
You can tune your swappiness to maximize the use of ram ... = This is usually terrible idea. Most ppl have no clue of the consequences. The defaults are great, and decreasing swappiness mean you have loads of stale data using DRAM which must then be slowly removed when the squeeze comes. So when you need to swap you're not just boned, you're roasted. Anyway this guys isn't close to swapping anything.


He needs to see what EXTRA services are running.
See what if anything is eating CPU time (sar htop, audit).
See what is using DRAM (free, htop, ps).

William Haller
6th June 2012, 09:14 PM
I'd also recommend pulling up system settings from the KDE menu, selecting desktop effects, and going through the all effects list and turning off all the eye candy you don't really need. You can make KDE a lot snappier if it isn't working as hard drawing your desktop without going to the extremes of a minimalist window manager.

I'll second getting rid of nepomuk and stringi - in the Desktop Search part of system settings.

sillav
7th June 2012, 06:29 AM
delete unnecessary packages = NO speed impact.
disable some service = Yes that's the main issue.
No idea if there are any gnome settings that improve speed.
You can tune your swappiness to maximize the use of ram ... = This is usually terrible idea. Most ppl have no clue of the consequences. The defaults are great, and decreasing swappiness mean you have loads of stale data using DRAM which must then be slowly removed when the squeeze comes. So when you need to swap you're not just boned, you're roasted. Anyway this guys isn't close to swapping anything.

As to the first, we'll have to agree to disagree. There are things that get started up by the desktop that aren't services, (systemd sense) and removing them will help improve the startup time and responsiveness fo the desktop. In addition, removing unnecessary plug-in packages should help with start-up time of applications that allow optional loading of plug-ins. More importantly though, is how it relates to the second point of disabling services. I'm a big believer in that you should never disable that which you can remove. Don't need sendmail? Don't disable it, remove it. On bad shutdowns my root partition is about 1gb smaller than it would be based on a default install, which means my fscks go that much faster.

The last you seem to be in the minority of opinion. The only evidence I've ever seen you provide for your opinion is a pithy statement from a kernel developer from the lkml in the early 2000's. A basic google search will turn up reams of advice that runs contrary that your statement, from a variety of sources, all in the past 5 years. I would not at all be surprised to see him run a free -m after an hour of nothing but web browsing, and see stuff swapped out. Which is entirely the point with respect to tuning swappiness. There are other benefits, ie., ssd's, but as he never mentioned having them there isn't much point to going on with it.

Adunaic
7th June 2012, 09:37 AM
It will not work for your "volume management" if you mean LVM and it will destroy system security.


I am being ignorant here, but what in that affects system security?

stevea
7th June 2012, 11:41 AM
As to the first, we'll have to agree to disagree. There are things that get started up by the desktop that aren't services, (systemd sense) and removing them will help improve the startup time and responsiveness fo the desktop.

Be specific. You sound like someone involved in voodoo instead of managing deterministic machines.
There are all kinds of "THINGS" that get executed before you see a desktop, but ignorantly removing packages at whim is not an approach to solve a problems. Many packages can't be removed. Instead you need to see what if anything is causing a delay - and CONFIGURE it, not REMOVE it.


In addition, removing unnecessary plug-in packages should help with start-up time of applications that allow optional loading of plug-ins. More importantly though, is how it relates to the second point of disabling services. I'm a big believer in that you should never disable that which you can remove. Don't need sendmail? Don't disable it, remove it. On bad shutdowns my root partition is about 1gb smaller than it would be based on a default install, which means my fscks go that much faster.

Sendmail is getting used whether you know it or not. You may have mboxes of admin messages building up awaiting transfer. It can be replaced with something light llike ssmtp, or you can find the sources for all the messages (mostly within cron) and fix them. Otherwise you are using a hatchet to do surgery. Brute force, with ignored side effects. Anyway Fedora has a lot of creeping package dependencies than make removal impossible in many cases.

If gaining faster fsck's is an issue, your priorities are all wrong. Stop the crashes.

No - you CONFIGURE your system to do just what you want. Again - give us a real word example of some plugin load that causes substantial delay - and NAME it and measure it and then ppl can rationally decide way if they do or don't want to pay the price. You are making "shotgun approach" a virtue; it's not.

Yes if you have an UNUSED package you COULD remove it (is it worth the time and effort to recoup 50MB on disk?) but that is not an administration method.


The last you seem to be in the minority of opinion. The only evidence I've ever seen you provide for your opinion is a pithy statement from a kernel developer from the lkml in the early 2000's.

Yes I am in the minority - I've worked kernel code for years; I understand the issue.


A basic google search will turn up reams of advice that runs contrary that your statement, from a variety of sources, all in the past 5 years. I would not at all be surprised to see him run a free -m after an hour of nothing but web browsing, and see stuff swapped out. Which is entirely the point with respect to tuning swappiness. There are other benefits, ie., ssd's, but as he never mentioned having them there isn't much point to going on with it.

A million ignorant opinions ... well they must be right then :C That's how democracies operate, but it has nothing to do with deductive reasoning and deterministic systems.

You argument aren't even rational. WHY do you imagine the proper swappiness settings has changed in the past 10 years ? It hasn't - that's nonsense. The difference is that the creation of this feature was first to benefit of professionals who actually analyze their systems operation, and later the goobers come along and post ignorant opinions about setting swappiness to 10.

Why not create a test load that mimics your day to day use - and measure performance it at various swappiness settings. It's been done before if you search. Yes there are cases where even very low swappiness is an improvement, but it's not common. When swapping occurs, then a higher swappiness figure is a big advantage. When swapping doesn't occur then a lower figure is an advantage. But in practice a middle figure that doesn't create too much excess disk activity but still keeps a lot of pages free-able is best.

If you KNOW you'll never use all memory and you have enough mem for all apps and extra for buffers - then go ahead an set swappiness to 0. I've got 8GB on my laptop and I swap whenever I do system builds. If I have 16GB I'd still swap. But my performance during the build is a LOT better since I have swappiness at 60.





I am being ignorant here, but what in that affects system security?

http://www.harald-hoyer.de/personal/blog/fedora-17-boot-optimization-from-15-to-3-seconds

He gets rid of firewalls and selinux to improve boot time. Some of his actions would appear to harm system performance to gain boot seed. That's not a realistic system.

sea
7th June 2012, 01:22 PM
A list of some good explanations of the services are to be found here:
http://www.ihackforfun.eu/index.php?title=improve-security-by-removing-services

And to work yourself into SystemD, you might want to read the 4 pages (add the ending 1 to 2,3,4:
http://0pointer.de/blog/projects/systemd-for-admins-1.html

Also, i have written a script, that asks what things you use, so, as far you know what you're doing, and giving the 'proper' answers, it should help:
st tweak services (http://sea.hostingsociety.com/screenshots/tweak--services-before.jpg)

http://sea.hostingsociety.com/?p=Scripts&stc=Installation

marko
7th June 2012, 07:25 PM
I'd also recommend pulling up system settings from the KDE menu, selecting desktop effects, and going through the all effects list and turning off all the eye candy you don't really need. You can make KDE a lot snappier if it isn't working as hard drawing your desktop without going to the extremes of a minimalist window manager.

I'll second getting rid of nepomuk and stringi - in the Desktop Search part of system settings.

Getting rid of nepomuk makes some KDE features like kalarm not work, you can also forget using kmail ever again if you turn off nepomuk. I'm using thunderbird now because of that.

Just so you know there's a price...

William Haller
7th June 2012, 09:05 PM
If kmail would reliably connect to an IMAP server more than once, I'd care. As it is - well... t-bird it is for me too.

sillav
7th June 2012, 09:50 PM
Be specific. You sound like someone involved in voodoo instead of managing deterministic machines. There are all kinds of "THINGS" that get executed before you see a desktop, but ignorantly removing packages at whim is not an approach to solve a problems. Many packages can't be removed. Instead you need to see what if anything is causing a delay - and CONFIGURE it, not REMOVE it.

assistive technology is one specific example. 'voodoo, ignorantly, at whim', I'm not sure why you are being so rude about this. have you never disagreed politely with someone before?


Sendmail is getting used whether you know it or not. You may have mboxes of admin messages building up awaiting transfer. It can be replaced with something light llike ssmtp, or you can find the sources for all the messages (mostly within cron) and fix them. Otherwise you are using a hatchet to do surgery. Brute force, with ignored side effects. Anyway Fedora has a lot of creeping package dependencies than make removal impossible in many cases.

no. sendmail is not installed on my system, it is most definitely not being used for anything. it likely has many functions I am not aware of, but as I don't need them I've never bothered to learn about them.


If gaining faster fsck's is an issue, your priorities are all wrong. Stop the crashes.

It was just one example of a benefit to removing packages. There are others.


No - you CONFIGURE your system to do just what you want. Again - give us a real word example of some plugin load that causes substantial delay - and NAME it and measure it and then ppl can rationally decide way if they do or don't want to pay the price. You are making "shotgun approach" a virtue; it's not.

Removing packages I don't need or want isn't configuring my system to do what I want? The next time I setup a laptop with F17 I'll take some measurements before and after. I'm not sure I've advocated shotgun anything, or suggested any approach to configuring a computer has an inherent moral worth.


Yes if you have an UNUSED package you COULD remove it (is it worth the time and effort to recoup 50MB on disk?) but that is not an administration method.

It's more like 1GB as I said, and rather than learn how to configure programs I remove them. It's not just the disk space either, but the cost of applying updates over the 18 months or so the os is supported. This may become even more important in 3.6 when gnome will force you to reboot for updates.


Yes I am in the minority - I've worked kernel code for years; I understand the issue. A million ignorant opinions ... well they must be right then :C That's how democracies operate, but it has nothing to do with deductive reasoning and deterministic systems. You argument aren't even rational. WHY do you imagine the proper swappiness settings has changed in the past 10 years ? It hasn't - that's nonsense. The difference is that the creation of this feature was first to benefit of professionals who actually analyze their systems operation, and later the goobers come along and post ignorant opinions about setting swappiness to 10.

'ignorant, aren't rational, imagine, goobers, ignorant', again, not sure why you are being so rude about this. For those who aren't as informed as you about the swappiness argument, you can find summaries on the arch wiki, ubuntu wiki, and elsewhere online.


Why not create a test load that mimics your day to day use - and measure performance it at various swappiness settings. It's been done before if you search.

By one of a million goobers I suppose?


Yes there are cases where even very low swappiness is an improvement, but it's not common.

How would you know what is common without knowing the typical setup of a typical linux user on their typical machine and typical usage pattern? I'm not sure whether or not most people will benefit from tuning swappiness, but some might, so anyone who cares should look into it.


When swapping occurs, then a higher swappiness figure is a big advantage. When swapping doesn't occur then a lower figure is an advantage. But in practice a middle figure that doesn't create too much excess disk activity but still keeps a lot of pages free-able is best.

Well, at least you've finally admitted that some people benefit from adjusting swappiness. And I agree that not everyone should do it without understanding what they are doing and why, and making sure it makes sense on their setup. So I guess, in the end, we agree.