Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi, I'm effectively a complete unix newbie, although I did play around with it a bit about 15 years ago. I've just installed linux (mandriva 64bit) on my home system (athlon 64 laptop, 1Gb), principally because I want to run some intensive number-crunching, command-line driven, scientific apps as fast as possible. I had assumed that these sorts of programs running in full 64bit Linux would be considerably faster than in 32bit Windows... However, so far I am having difficulty getting any significant performance benefits.
The program I am playing with at the moment is called MrBayes. It is distributed as compilable code with a makefile. At this point I should reiterate that although I am familiar with some general concepts in IT and have done a very little programming a very long time ago, I have almost no practical experience of unix. I didn't know what a makefile was until yesterday!
Anyway, when I first compiled the program using the supplied makefile it actually ran about 5% slower than in 32 bit windows... I have now done some research and added some flags to optimise the compilation and it does now run faster than in windows, although only by a bit more than 5%. Here is the original bit in the makefile that specifies the flags for compiling :
I know that some of those may be redundant, in that some are effectively subsets of others, but I'm not certain which and I am assuming it doesn't do any harm to over specify. The only one that I am certain made any difference was "-ffast-math".
So - is there ANYTHING else I can do to get the program running faster, either in the compilation process or in my system in general? I am running it outside of "X". For all I know there could be something really basic I haven't done at the OS level. Any advice appreciated! Thanx.
Unfortunately, I've absolutely no idea what most of these things mean - e.g. :
"Always pop the arguments to each function call as soon as that function returns. For machines which must pop arguments after a function call, the compiler normally lets arguments accumulate on the stack for several function calls and pops them all at once."
Do I want to do that? I would be better qualified to guess the colour of the Pope's underpants.
If anyone can tell me which of those flags is actually likley to offer significant performance benefits in my particular situation, I would be most grateful!
If you're looking for performance gains, I would suggest moving completely to Gentoo. Not only will your entire system run faster, but there are many howto's describing what flags are safe for compiling what packages on what processors.
For example, your Mandriva is probably compiled with -mtune=x86_64 (for compatibility reasons), whereas if you compile yourself, -march=althon64 enables more optimizations. You usually don't have to worry about things like popping etc., since they are in the default -O, -O2, or -O3. Also, -fomit-frame-pointer is not required on athlon64. The gentoo page above describes the `safe flags' (those you should use to compile big things like binutils, gcc, etc.). For other stuff, you could probably afford to be more aggressive. Remember, if you can tune the kernel, the c library, etc., it might offer more performance gain than just tuning your program.
Also, just using 64bit mode doesn't automatically make a program run super-fast. Some projects are tweaked for 32-bit processors. Others, by their theoretical nature, should notice no difference in performance with a processor switching modes. Also, number-crunching code usually uses high-performance libraries/extensions (e.g., MPI, HPF, etc.), some of which may not be free (as in speech).
Thanks, that's great. Of course being a novice, I installed mandriva from a relatively idiot-proof DVD setup program ("powerpack"). I hadn't realised, or had forgotten, that the OS itself is actually compiled specifically for each installation.
I'll need to do a lot more homework if I am to do things that way. Should be fun though.
I've looked at the Gentoo installation guide: http://www.gentoo.org/doc/en/handboo...d64.xml?full=1
and can see that it's a lot of work. I'm not sure I have the time to get to grips with all of that at the moment. This may be a silly question, but I don't suppose it's an easy matter just to recompile the important bits of of my mandriva system (core?) while leaving the bulk of the installation intact?
Being a software developer myself, I can tell you that performance optimization is a lot more than just specifying/omitting certain compile flags. Aggressive flags like -O3 can often result in no performance gain since they tend to increase the code size. Also, running a program on a 64-bit platform does not automatically boost performance compare to it being run on a comparable 32-bit platform, especially when the program is originally designed for a 32-bit architecture and simply compiled on a 64-bit system.