PDA

View Full Version : Anyone up for a hardware mystery?


DNAunion2000
01-06-2004, 12:45 AM
DNAunion: Hold on a minute? Are you saying that Tygur's computer is slower than yours, and you have PIII 1 GHz with 256MB RAM???

I was wondering earlier, when Tygur's computer worked out to be 3.6 times faster than mine how that could be. I have a 2.4 GHz PIV with 512MB DDR-SDRAM (and 120GB HD). But even with those specs my computer has to be MUCH slower than yours (since mine is slower than Tygur's, and Tygur's is slower than yours).

Man, I got ripped off somehow.( http://coderforums.com/showthread.php?s=&threadid=2398&perpage=15&highlight=Tygur&pagenumber=2)

My computer has a 2.4GHz Pentium 4 CPU and 512MB DDR 266MHz SDRAM and should easily surpass both Tygur’s and Php_Brian’s, which is just a PIII 1GHz with 256MB of RAM. Yet theirs are faster than mine by a factor of about 3.5. How can that be? The speed related items I thought of that might be “incorrect” in my configuration were the CPU, the FSB (front side bus), and the RAM. Perhaps it’s really a much slower CPU and the ads lied? Perhaps the FSB isn’t set to the correct speed? Perhaps slower RAM was installed and the ads misrepresented the speed? So I started looking.

CPU?
First, I checked the CPU…well, sort of. I didn’t actually examine the chip, I (1) looked in Windows XP’s Device Manager and found that it reported to be a 2.40GHz Intel Pentium 4, and (2) noted that during bootup the “DOS screen” listed the CPU as a 2.40GHz processor. Finally, I used Windows XP's Performance Monitor to confirm that the CPU frequency was coming out at 2399MHz. So it is in fact a 2.40GHz Pentium 4 CPU.

FSB?
Next I wanted to check the FSB. According to a table on page 184-185 of Scott Mueller’s Upgrading and Repairing PCs: 15th Anniversary Edition (Que, 2004), a 2.4GHz Pentium 4 CPU requires either a 400MHz or 533MHz bus speed (the CPU core speed would be multiple of that, such as 6x for a 400MHz FSB). My motherboard appears to be set for 100 MHz instead of 400/533 MHz, even though the motherboard supports 400/533MHz FSB.

”This mainboard has a Socket 478 for the Intel Pentium 4 type of processors supporting front side bus (FSB) speeds up to 400/533 MHz.” (P4VMM2 mainboard booklet)

In the board’s CMOS Setup the only entries relating to the CPU are as follows, from the CPU PnP Setup screen:

CPU Brand: Intel
CPU Type: Pentium 4
CPU Ratio: Locked
CPU Frequency: 100 MHz


I cannot modify the last two.

The motherboard automatically detects the processor type and sets the values:

”This mainboard automatically determines the CPU clock frequency and system bus frequency for the processor. You may be able to change these settings by making changes to the jumpers on the mainboard, or changing the settings in the system Setup Utility.” (P4VMM2 mainboard booklet)

However, despite what that statement suggests, I cannot make a change to the CPU settings in the system Setup Utility. That leaves just the motherboard jumpers as a means to potentially override the automatically determined values. But the only possible options for the “CPU clock” jumpers are:
a. 100 MHz (JP1A1 with pins 1&2 shorted and JP1B1 with pins 2&3 shorted)
b. 133 MHz (JP1A1 with pins 1&2 shorted and JP1B1 with pins 1&2 shorted)

So there’s no way for me to modify the settings up to 400/533MHz: I’m stuck with 100Mhz (or if I dare fiddle around with things and risk generating timing issues or overheating, 133MHz).

However, as I found out only after spending a lot of time on this “theory”, the 100MHz FSB that the motherboard selected is probably correct. On page 179, of Scott Mueller’s book he states:

”Technically speaking, the processor bus is a 100MHz, 133MHz, or 200MHz quad-pumped buss that transfers four times per cycle (4x), for a 400MHz, 533MHz, or 800MHz effective speed.”

So the literal frequency is 100MHz, but signals are sent 4 times per cycle, giving an effective 400MHz FSB.

RAM?
First I noted that during bootup the “DOS screen” indicated that there were no (slower) SDRAM DIMMs and 1 DDR SDRAM DIMM. So far so good: although the motherboard supports both (1) PC100/PC133 SDRAM and (2) DDR 200/266 SDRAM DIMMs, it appeared that the correct type, and only the correct type, was installed.

I next opened up the case and looked at jumpers and the memory module itself. The module indicated “elixir DDR 266 512 MB”. Another good sign, but RAM can always be run at slower speeds, so perhaps it wasn’t being run full out, or perhaps other jumpers were setup wrong.

Next check was the DRAM Voltage (VCC) jumper, which could be set to either slower 3v SDRAM (pins 1 & 2 shorted) or faster 2.5v DDR SDRAM (pins 1 & 2 open). Both were open so again the memory seemed to check out.

The final motherboard jumpers to check were the DDR/SDR DRAM Type Selector jumpers J2A/B/C/D and J3A/B/C/D. If they were all shorted then it would indicate DDR1 and DDR2 (I believe that the DDR1 and DDR2 memory slots were the ones that were operational) whereas all of them being open would mean DIMM1 and DIMM2 (again, apparently, that those two memory slots would be active instead of the other two). This checked out also: all were shorted.

Success!?
I finally found something. According to a table on page 430 of Scott Mueller’s book, DDR266 DIMMs should be run at 133MHz, not 100MHz (running at 133MHz and operating at 2 cycles per clock cycle would give the 266MHz effective rate their name implies). Looking at the table, my DDR266 appears to be running only at DDR200 rates, with a throughput of only 1,600MBps instead of 2,133MBps.

Worse yet, apparently even if the DDR266 SDRAMs were achieving their maximum transfers they still wouldn’t be appropriate for a 2.4GHz Pentium 4 CPU. A table on page 431 of Scott Mueller’s book indicates that a 400MHz Pentium 4 FSB (100MHz clock speed quad-pumped) has a bandwidth of 3,200 MBps. Note that right above that table the author states: “Generally, things work best when the throughput of the memory bus matches the throughput of the processor bus.” Apparently, if there is a mismatch -- as there is here where my RAM can’t keep up with my CPU, which has twice the throughput -- wait states are generated. To match the 3,200MBps of the CPU the memory needs to be DDR400 with an actual 200MHz (800MHz effective rate) FSB, but my motherboard wont’ support that. There is another possible solution, but I am not sure: the DDR DIMMs could be setup in a dual-channel configuration which, I believe, doubles their throughput. So I think the proper setup for my motherboard/CPU combination is to have both banks setup with DDR200 DIMMs. But wouldn't that just double the amount of RAM? How does one setup dual-channel memory?

Is that enough?
But is the above memory/CPU mismatch I found enough to account for the large discrepancy between our two systems’ speeds? Doesn’t appear to be to me. Even if my memory, running at half speed compared to the CPU, degenerated the CPU through wait states to half its speed (which it wouldn't, since >90% of memory accesses are handled by SRAM cache), that would still put it at an effective 1.2GHz CPU with 512 MB RAM. A 1.2GHz P4 and a 1GHz PIII might be about the same (since a P4 has a longer pipeline which slows it down when the pipelines have to be flushed and refilled). Still, even under this unjustified assumption, mine should definitely be no slower than the others, let alone running at just 1/3 their rate.

Any thoughts on what else might be the problem?

sicarius
01-06-2004, 10:02 PM
Could be an issue with temperature. What is the temperature inside the case?

MJPhill
01-07-2004, 09:44 PM
Indeed, I believe that the Penitum 4 processors automatically throttle themselves down to a lower speed if there's too much heat for them to handle.

DNAunion2000
01-08-2004, 11:20 PM
One programmer at work ran the code on his 1.8GHz Pentium 4 here and got times tightly clustered around the 0.95 seconds that Tygur originally did. He also ran the code on his "lowly" 850MHz AMD Athlon at home and ended up with 1.77 seconds: still half the time it took my system. So the oddball system here is mine, not Tygur’s (that is, it’s not the case that Tygur’s is somehow running miraculously fast, but that mine is running extremely slow).

Some programmers at work suggested that the problem might be that we are using very different languages/development environments and/or OSs. That does not appear to be the case.

Tygur stated that it’s a VB.NET console app, running in Windows XP, and completed on his system in 0.95 seconds. I copied the code into my VB.NET IDE and ran it as a console app under Windows XP…on my system it took 3.42 seconds to complete: 3.6 times as long.

After looking at some other of Tygur’s posts I was able to get a breakdown of Tygur's system for comparison (I can’t get all the details):

Tygur:
OS: Windows XP (don’t know whether its Home or Pro)
IDE: Visual Studio .NET 2002
CPU: AMD Athlon XP 2200+ (he says running at 2600+ speeds: perhaps he overclocked it)
RAM: 1GB DDR333 SDRAM
L1 cache: 128KB @ 1800MHz
L2 cache: 256KB @ 1800MHz
FSB: 266MHz (according to Scott Mueller’s book)

Mine:
OS: Windows XP Professional
IDE: Visual Studio .NET 2003
CPU: Pentium 4, 2.4GHz
RAM: 512MB DDR266 SDRAM
L1 cache: 20KB @ 2400MHz
L2 cache: 512KB @ 2400 MHz
FSB: 400MHz

One-by-one comparison:

OS: They are either the same, or his is the "lesser" Home edition (which would mean what as far as speed?)

IDE: Note that Php_Brian, in a different comparison, stated that .NET 2003 ran VB test code faster than .NET 2002: another programmer I know said there was no measurable difference. So either we tie on this item or I have a slight edge.

CPU: The CPUs themselves should be roughly equal. The AMD runs at 1.8GHz but because it has a shorter pipeline it actually gets more done per average cycle than a Pentium 4 (that’s why AMD doesn’t market it as a 1.8GHz processor but rather as an equivalent-to-a 2200+ MHz processor). In general, mine should be a little faster (2.4GHz vs 2.2GHz) but Tygur might have overclocked his, giving him a very slight edge (2.4GHz vs. 2.6GHz).

RAM: He has twice the RAM, and it’s faster, but I don’t think that matters here. As far as size is concerned, the only large data structure his code uses is a 500,000-element integer array. Assuming 8 bytes/element that works out to be about 4MB: so 512MB of RAM should be able to handle all of that just as easily as 1GB can. Also, since caches work at >90% hit rates, main memory plays a lesser role than caches as far as speed is concerned anyway.

L1 cache: He has a larger, but slower, L1 cache. In general, it is better to have a faster cache than a larger cache (but I don’t know where the breakeven point is). Besides, when both the L1 & L2 caches are taken into consideration – and in both systems both the L1 and L2 are integrated into the CPU die and run at full CPU core speed – I do have the larger (and faster) cache system.

L2 cache: I have both a larger and a faster L2 cache, giving me the edge here.

FSB: My FSB is 50% faster than his, giving me the edge here.

All in all, the systems are pretty close but I should have the edge…yet my computer takes 3.6 times the amount of time to run the code as his does.

************************************
Some suggested possible problems I have yet to check out:

1) Did I run the program from within the IDE, or did I compile it and run it standalone from a command prompt? I don’t remember. I’ll have to try it both ways and see how much difference there is.

2) Is my CPU running hot? I had already looked at the CPU temp in the CMOS Setup utility and it didn’t look high, but I didn’t have any actual figures as to what too high really is. I will have to check again once I find the recommended max temp.

3) Is AOL to blame? I’ve had recurring problems with my system locking up when I’m on AOL. AOL does seem to be misbehaving and I know that when I ran the code and timed the resulted that I was logged on. Perhaps AOL is somehow sucking up way too much memory or CPU cycles. I’ll try running the code with AOL open and with it closed.

stuka
01-09-2004, 07:15 PM
I'd think it's safe to blame AOL for most of the wrongs on the "net AND the postal system (all those dang CDs have GOT to be a burden!).

Whiteknight
01-09-2004, 07:16 PM
also, do you have any RAM management apps running on your computer? some of those so-called RAM management applications actually force a RAM dump into your pagefile to "clean up" your memory.

i was about to suggest temperature but i see you have looked into the problem already.

to be honest, I would love to see your respective task managers, and what all programs you and tygur are running. a few runaway pagefaults or clock cycles could be your demon.

php_brian
01-10-2004, 03:21 AM
Just for my sake of correcting incorrect information, I don't run a PIII 1GHz machine. I have an AMD XP 2400+ with 1GB DDR RAM.

DNAunion2000
01-10-2004, 02:19 PM
Originally posted by php_brian
Just for my sake of correcting incorrect information, I don't run a PIII 1GHz machine. I have an AMD XP 2400+ with 1GB DDR RAM.

Yeah, after rereading the thread I saw that the PIII 1 GHz was the computer you used, but not your computer (I think it was your school's computer). Sorry about that.