Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Hi.
I try to compile some kernel modules (rt73 wireless adapter driver) with two different laptops.
Same OS installed to all of them and up to date. (Fedora 8)
First laptop has 1GB RAM and Intel Core2Duo T5200 @ 1.6Ghz
Second one is has 2GB RAM and AMD Turion TL-58 @ 1.9GHz
Intel compiles modules in ~3 secs.
AMD compiles same modules in ~17 secs.
Why are the results so different?
Should I optimize GCC to work good with AMD?
Or should I optimize whole system to work good with AMD?
The dual core thing really should not matter in this case. GCC will pretty much only use one core.
I could not find any charts comparing those two cpus, but if they follow past history(on mobile cpus) the Intel cpu probably just has more horsepower than the AMD. The AMD mobile processors generally worry more about power consumption and price than raw horsepower. That could account for maybe half the discrepancy you are seeing. Just for the record I use AMD.
If power saving is set up correctly it should not matter, but it is fairly common for it to be acting screwy(certainly worth a try).
I do not think attempting to optimize you system (as in recompiling) will make any real difference. The best numbers I have seen on this are well under 5%.
It wouldn't hurt to recompile GCC with optimizations specific to your CPU if possible, to at least see how much (if any) speed is gained. That said, unless you end-up saving significant amounts of time, it's probably not worth the risk - considering that your recompiled GCC will never be able to get the same amount of testing which the Fedora-provided GCC has. Personally, I'd probably just live with it, it's the performance of the binaries GCC generates which I care about (unless of course I was, for example, compiling something that would take like 7 days with the Fedora GCC and 3 days with my own).
OK, there are no lot of things to make gcc run fast.
But this result is so interesting.
Intel 3secs, AMD 17secs.
Intel is 6 times faster at compiling?
There must be something I miss.
Or... I will buy Intel next time, I think.
That could account for maybe half the discrepancy you are seeing.
Again note I said MAYBE half. There is something amiss on your AMD setup. Whether it is a miss configured powersave, bad stick of ram, or what else I will not even guess.
I would compare what I payed for each machine (including extra memory etc). Usually the AMD provides more bang for the buck.
The difference in performance may or may not be CPU related. Use the top command to monitor the %CPU used during the two compiles and see if the CPUs are the bottleneck.
lazlow: All of test I made are parallel with tests results on the web as the link you gave. But at compiling I'm missing something I think...
Quote:
Originally Posted by jailbait
The difference in performance may or may not be CPU related. Use the top command to monitor the %CPU used during the two compiles and see if the CPUs are the bottleneck.
Steve Stites
While compiling top displays that max CPU using program is cc (or cc1) and it's near %30.
I'm running laptop with AC power.
When I type "cat /proc/cpuinfo" I can see two core.
I'm sure CPU frequency is at max (1.9GHz) while compiling.
I do not know what should I do.
The performance difference described in this thread is more likely to be a filesystem/disk issue than a CPU issue, but even that can't reasonably explain such a big difference in time.
Quote:
Originally Posted by almora99
When I type "cat /proc/cpuinfo" I can see two core.
That doesn't tell you whether Linux is able to use both cores. But (as someone else mentioned), gcc wouldn't use both at the same instant anyway, so having Linux able to use both cores only matters if something else is using significant CPU time during the compile (in which case the disk accesses of that something else are more likely to be the real issue).
Quote:
Originally Posted by almora99
I'm sure CPU frequency is at max (1.9GHz) while compiling.
How are you sure? What did you use to check that? If I'm wrong about this being a filesystem/disk issue then the power saving issue others suggested is such a good theory, you should check that more carefully.
I type
cat /proc/cpuinfo |grep MHz
while compiling to see what CPU's current speed is.
And about Filesystem/Disk issue:
I did tests about filesystem/disk issue. On this issue AMD laptop %30 faster than Intel. I think laptop which has Intel CPU has a 4200 RMP HDD.
lazlow:
top command shows CPU usage for cc1 (cc) about %13-%30-%20...
Some periods it does not show about cc, CPU usages of other than cc process are about %0 always.
Should it be near %100 (assuming gcc uses one core) every compiling process?
Compiling requires low latency hard drives to access the files.
The Turion is a K8L and the Core 2 Duo is newer and better (more efficient). Sure the Core 2 Duo processor will be faster.
Multiple processors does help during compiling. One processor will collect the data or compile other sets of data while the second processor will compile the other parts of data. The -j option depends on the design of the program if it can be compile in parallel and to load the processors. Multiple processors also helps doing file system IO tasks.
The utility top shows processor usage in single mode or in separate mode. Hit 1 to toggle through the modes.
I recommend do a re-test with flash memory that includes ECC or SSD with ECC.
Turions were designed to compete against Celerons and Pentium M processors.
Compiling requires low latency hard drives to access the files.
The Turion is a K8L and the Core 2 Duo is newer and better (more efficient). Sure the Core 2 Duo processor will be faster.
Multiple processors does help during compiling. One processor will collect the data or compile other sets of data while the second processor will compile the other parts of data. The -j option depends on the design of the program if it can be compile in parallel and to load the processors. Multiple processors also helps doing file system IO tasks.
The utility top shows processor usage in single mode or in separate mode. Hit 1 to toggle through the modes.
I recommend do a re-test with flash memory that includes ECC or SSD with ECC.
Turions were designed to compete against Celerons and Pentium M processors.
Again the Turion was not designed to compete against the Core 2 Duo. It was designed to compete against a Pentium III and a Celeron (Pentium 4 model). It could also compete against a Pentium M.
Dah, the dual processor Core 2 Duo beats the single processor Turion.
A Turion can process two instructions at a time so its computing factor is 3800 (1900 MHz X 2 instructions per cycle). A Core 2 Duo (set in single processor mode) computing factor is 6400 (1600 MHz X 4 instructions per cycle).
Using tmpfs or ram disk will effect the timing because Linux is doing buffering and caching on it too. tmpfs is not a solid state disk.
I am not an Intel fan. I am more an AMD fan. Though comparing two processors from different times will give you very different results.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.