Archived

This topic is now archived and is closed to further replies.

Coming from the world of windows...

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone. I''ve heard lots of good things about programming on linux / unix type OSes, so I decided to install a copy of FreeBSD 5.1... Everything works great, I''m just wondering if its normal that it takes 30+ seconds to open every application (I''m using the KDE window manager), I''m using a 1.4GHz processor with 512 megs or RAM, so I definately didn''t expect this kind of delay. The computers at my university all run redhat linux with the same problem, taking about 30 seconds to open any application... Do you experienced *nix users know anyway to get around this???

Share this post


Link to post
Share on other sites
Load times are going to become a concern soon. (Look mom! I''m a prophet!)

I''ll tell you what the problem is. Its not linux or bsd thats the problem, its that open source developers haven''t realized that load time is a problem, nor do they understand what affects it.

One thing that might affect it...
the command ''ldd'' shows what libraries a program depends on. Take a look at something simple sometime. like a calculator. Dependancies are monstrous. A calculator might depends on graphics libraries, audio libraries, math libraries, and other stuff.

dependancies are usually a good thing. Almost every program you can think of depends on libc. having only one copy of libc in memory saves memory and decreases load times.

the break down happens when (a) programs begin to depends on stupid things (calculator? audio libraries? huh?) and (b) multiple libraries offer the same thing, meaning programs that want J load in libJa libJb libJc and libJd all of which do the same thing, but each program depends on a different library. This is really not fixable (although project like gnome or kde standarized on their favored libraries, which fixes some of these problems), and is argueably desireable. competition. But then these libraries that offer different things also offer other things. Three programs wanting J now include libJBDAC, libQKEJYA, and libKJHLPO wasting lost of letters of the alphabet. (Also need to mention libraries that depend on libraries, which only adds to the problems.)

and so the libraries that need to be loaded from disk explode. But I suspect even this isn''t the bottleneck, since the HD light doesn''t stick on the whole time.

I''m hoping this problem sticks around long enough for me to write a master''s thesis on it. but then, six years is awhile to wait, isn''t it

Share this post


Link to post
Share on other sites
Despite all of that (what C-Junkie mentioned), 30 seconds is still obscene for almost any application to take to load. If you're not exaggerating, I'd be wondering if your HDD is somewhat misconfigured ("un-optimally") and running slower than it could.

C++ applications (more accurately: applications that link with libraries that export C++-style symbols; as all KDE and Qt applications are) do take longer to load than plain C applications because of how the linker works with C++. KDE apparently uses some tricks to partly work around this issue. If you look around you can find some articles on why this is so.

Edit: I can't spell and needed to clarify something anyway. Signature takes up too much space when coupled with "Edit" note appendage...

[edited by - Null and Void on October 11, 2003 9:43:14 PM]

Share this post


Link to post
Share on other sites
I''d agree with Null and Void about the HDD being a suspect in this scenario. When I first boot my system, it takes several seconds for any program to load, as everything is loading off disk. However, once it''s been loaded into memory, subsequent restarts should be quite quick. Mozilla, for example, takes approximately the same amount of time to load on my system under both Linux (Gentoo) and Windows (XP), so it''s not a problem that''s specific to *nix. Thirty seconds is a ridiculous amount of time, even loading from disk.

Share this post


Link to post
Share on other sites
Well, anywhere between 15-30s is the usual time I have to wait to get any KOffice applications to open. My windows setup is very fast and doesn''t have a problem with load times at all, so the hard-drive itself is not suspect. However, I''m not sure exactly how *nix systems interface with the hard-drive at all, so it could be misconfigured in some way, I looked on FreeBSD.org for help on this issue but got nowhere.

Share this post


Link to post
Share on other sites
quote:
Original post by Null and Void
C++ applications (more accurately: applications that link with libraries that export C++-style symbols; as all KDE and Qt applications are) do take longer to load than plain C applications because of how the linker works with C++. KDE apparently uses some tricks to partly work around this issue. If you look around you can find some articles on why this is so.



I think I will. I was unaware of any difference in how the linker deals with C or C++ programs. I think you''re wrong, but I''m gonna go look. any links in particular?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
30 seconds it way much, you should probably enable DMA for yout hard drive (how that is done i have no idea of)

C-Junkie: It has to do with all the relocations that have to take place during the loading of C++ programs.
http://www.suse.de/~bastian/Export/linking.txt

Share this post


Link to post
Share on other sites
I have enabled DMA and everything is much faster now. However, instead of 30 second to open a program its now about 4-7s, which still seems slow considering I have 512 MB ram and 1.4GHz athlon processor...

I''ve heard lots about the program "hdparm", but that is a linux program, not a FreeBSD one (I could run it, but it affects system files, etc... that are specific to linux systems and not FreeBSD).

I''m not sure what else I could do to make things run any faster... But having to wait for 7s to open a program is still incredibly annoying and hard to work with...

Would you recommend that I try a linux distribution (instead of FreeBSD) so that I can use hdparm?

Share this post


Link to post
Share on other sites
4-7 dosn''t sound all that odd. Even with DMA on your not going to get much more than 30MBPS on any system no matter how much RAM or how fast your CPU is. At least thats my understanding as to it being the limmit the IDE setup will alow. Dispite DMA66-133 being around. If a program has a lot to load your just stuck waiting. If its tiny little programs like CD players then that would be a bit much. Seeing as how DMA took you from 30 down to 4-7 I would think you found your problem. DMA is just recently been getting set on install under Linux I don''t know about FreeBSD. Used to seam silly to me not to turn it on by defualt or atleast ask during install. Nobody wants their HD runing at 2-3MBPS.

Share this post


Link to post
Share on other sites
I used to wonder why my friends always had faster speeds at LAN parties when I had the uber processor and video card at the time.

Turned out that my hard drive was going bad. Replaced the hard drive and my system was running as fast as it should have...only by the time I figured it out, my machine wasn''t the uber machine anymore. B-)


When I installed Gnu/Linux on my machine, I wondered why it was that my mp3s and games would play sound so choppy. I thought maybe it was just KDE 2, which was really slow in general.

Turned out it was the way my hard drive was configured. By default, Linux will run the hard drive at its quickest and safest...which generally means that if it doesn''t know the hard drive, the quickest would be something safe, like no DMA and other things.

hdparm -Tt /dev/hdX

Try that. It will tell you how fast your drive is.

When I applied the hdparm settings I found on the net about my drive, I went from 1-2MBps to 64-74MBps. I didn''t want to try to get it faster, even though I could. I wasn''t actually aware at the time of what I could apply as I wasn''t familiar with my drive. Applying settings that the drive can''t handle makes it unstable. You''ll lose data. I was satisfied with the jump I was able to manage, but I could find more info or experiment if I was brave.

Seconds to boot a program? A KDE app at that? That isn''t bad at all. But the post about dependencies is right on. Generally, Linux/UNIX apps might need to use multiple libraries for different things. Some apps will have statically linked libraries which makes them faster, but also makes them harder to upgrade (replacing the entire app rather than a library it depends on, for instance).

Of course, if you are using a lot of apps that share the same library, the speed will appear to improve. Opening the first app will cause the library to be loaded, and opening subsequent apps will simply use the already loaded library. The subsequent apps will appear to load faster when in actuality, they just had to load less from the hard drive. This should be the case with KDE and the "k" apps.

Share this post


Link to post
Share on other sites
I have a computer with similar specs (only 1.3MHz and only 256 Mb ram) and most programs load in about 4 seconds, OpenOffice.org takes 6 seconds, and that''s considerably faster than most Windows2000 applications on the exact same computer.

Share this post


Link to post
Share on other sites
Ok, I guess the 4-7s wait is normal then, that''s good. As I understand it... the fact that I have a fast processor and high RAM doesn''t affect load times, since it is limited by the speed of my HDD when loading all the libraries it uses. I was just curious what else I could do to tinker with the drive under FreeBSD, since I''ve heard many linux fanatics boast about how their linux setup was faster than their windows setup (which is sorta true in my case, except for loading programs, my FreeBSD setup seems faster).

Also, FreeBSD has no "hdparm" program to test how fast my data transfer is actually going, and I would really like to be able to do this.. any FreeBSD experts know of any way for me to test the speed of my HDD? I can''t seem to find this info anywhere.

Share this post


Link to post
Share on other sites