Why is there a lag when you open programs in Linux
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why is there a lag when you open programs in Linux
Hi,
I've had several distros and the thing that really bugs me is that when you open a program in Linux, there is always a 5 second (more or less) delay before it opens.
I've tried other window managers apart from KDE and the problem is still there , albeit to a slightly lesser degree.
This doesn't happen in Windows. Apps open almost instantly in XP.
Is there any way to improve this?
Remember that with certain apps (internet explorer, MS Office, Outlook Express) Windows XP cheats by preloading part of them whilst windows is loading. That's why firefox on windows takes longer to open than IE.
i think there is a way to speed up loading openoffice.org it comes with a taskbar bit that does some preloading of the app good job too because although it is very good it seems to take forever to load nomatter what machine
You can preload apps if you like. The process is not for the newbie though. You have to know some advanced topics. I've set up firefox to preload and it loads in about 1~2 seconds, but I was just playing around to see if it was possible.
Windows Xp cheats and preloads have the f&cking OS at boot that is why it sucks up 200MB or ram and 70 MB of page file right from the get go.
I can boot into my GUI and I havn't even breakin the 70 MB mark. I love it.
Anyway, one way to preload is to use ldd to figure out what libs an app loads and then bind them into /dev/shm. Binding file to file. Then when you app loads it will be effective loading from ram. Although I was just playing around it works pretty good. There are other ways too. How creative do you want to get?
Note:
It is very negligent for microsoft to preload explorer and other stuff. Any vunerablity that app has can be taken advantage of becuase it's in mem even though you are not actually using it. Maybe you never will. Perhaps you like to use the Opera browser. And all those apps are sitting there in mem none the less taken up space and adds an attack surface to you box for no good reason! And there is no way to tell it not to preload because it is written in the exe code itself. Very negligent on microsoft part.
To be perfectly honest, I don't really care how much ram my computer uses.
RAM is cheap and if it means I can open up apps a few seconds quicker, rather than waiting for that interminable lag, I'd rather buy a bit more ram if need be.
I know a few seconds doesn't seem much, but when you come from XP and apps open in an insant, and then you go to Linux, you tend to think how awfully slow and tedious the whole thing is.
If you don't understand the logic behind it or just plain don't care then go back to windows xp. Like I said it can be done in linux it's just that the user has an option.
I understand why it might be important for security ...........for a server maybe...but not for the average home user.
The fact that there is no easy way to get apps to load as quick as XP really puts people off. You say the user has the option but ,in effect, this isn't the case. The average user would have to spend the whole weekend reading up on how to do it and then if he/she was lucky, might get it t work. Maybe. So, the newbie really couldn't do this, as you said.
Unless anyone else knows a way?
I mean, even opening Konqueror takes about 3 secs from inside KDE!
Actually if you go into the kde config menu you can preload an instance of konqueror when KDE starts! But it's not the default becuase of the things I mentioned and others.
The market of microsoft is user friendlyness. There OS suffers big time for it, but that is their market and they want to make money of course so they are forced to criple the system to make it so. The user friendlyness market is a huge one so who can blame them.
Once you get to the medium knowledge status in linux you are king. Your productivity skyrockets but yes.. like you said most people just want it to work. Are you one? I love be able to control my box right down to the most low level things. So microsoft isn't for me but it is for most people that don't want to learn anything.
Originally posted by chbin Actually if you go into the kde config menu you can preload an instance of konqueror when KDE starts! But it's not the default becuase of the things I mentioned and others.
The market of microsoft is user friendlyness. There OS suffers big time for it, but that is their market and they want to make money of course so they are forced to criple the system to make it so. The user friendlyness market is a huge one so who can blame them.
Once you get to the medium knowledge status in linux you are king. Your productivity skyrockets but yes.. like you said most people just want it to work. Are you one? I love be able to control my box right down to the most low level things. So microsoft isn't for me but it is for most people that don't want to learn anything.
Thanks very much for the overall appraisal of MS and it's product. I would tend to agree with you.
I've been at Linux, on and off, for about 5 or 6 years now. There's no way I would consider myself a high level user,and proably not even a medium level one.
You ask, am I one that just wants it to work? Well, I want it to, but I want it to work my way and I find that getting things to work my way is often a huge undertaking in terms ok aquiring the necasary knowlege.I guess there's no way round that. One of the things that has really bugged me ever since I started Linux was the fact that it was ,or appeared to be , so slow. I just thought that there might be a quick fix for this.
I'll check out the preloaded konqueror thing.Thanks .
Quote:
Originally posted by Komakino Does it? You're the first person I've seen mention it. Don't state opinion as if it were fact.
I'm tempted to reply to errr...that order of yours, but really....you're own sig says all one needs to know about where you're coming from.
Yeah Right. You see my point. How in the world would they know what you use there are so many options in linux for everything. You want to do it, then yes of course you can. LEARN THE SHELL. LEARN THE ARCHETICTURE. IT IS DOABLE.
If you are lazzy and just don't want to learn anything then do a search on google. Probably someone even wrote a little shell script or little program to do it. In linux everything is up to you and you alone. I don't know though. Sounds like you are a windows person for life.
damn 5 or 6 years and your still asking such a question. Wow what disto do you use. Do yourself a favor and learn the shell.. it is increadable powerfull. There are tutorials on the net. Then you are only limited by your imagination with what you can do. And you wouldn't be asking how to preload apps but instead what is the best way to do it.
Originally posted by ludwig W I'm tempted to reply to errr...that order of yours, but really....you're own sig says all one needs to know about where you're coming from.
Yes, shame you've chosen to ignore it. I like the subtly disguised ad hominem attack there though.
sounds like you been using the wrong distros then.
in Gentoo it takes 3 secs to cold load firefox, once i open it tho, Linux loads it into memory, and as i don't do a lot of other stuff that would override all the memory, the next time i open firefox it might be as fast as IE in windows. then again, Gentoo is configures for my system, and its 100% shell install, tho the docs are good, if you don't know how to use the shell, you'll run into problems if you run into a problem ( hmm, don't sound right?)
you probably used bloated distros, that are configured for nearly all hardware/system, which prevents them from using 100% of the CPU's instructions, which can slow a program down a bit.
Another reason for the snag is the CPU/IO schedulers. In 2.4 kernels, the CPU scheduler is a bit laggy, while the 2.6 kernels use tho O(1) scheduler, which is largely a compromise between a desktop, and a high performance computing needs. The IO scheduler controls what program can use what disk at what time, in 2.6 you can pick what scheduler to use, use QFC for desktop, never had problems with it. the default anticipatory scheduler used to show its ugly face a lot, during compiling, when its doing lots of disk IO (say the installing part), if i was playing music, the music would skip, a lot ... no more with CFQ, also, deadline resembles the anticipatory scheduler in behavior I'm told, altho its more simple, faster, and does better for some database loads
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.