Boinc optimized client and CPU cache

Message boards : Number crunching : Boinc optimized client and CPU cache
Message board moderation

To post messages, you must log in.

1 · 2 · Next

AuthorMessage
Scarecrow

Send message
Joined: 15 Jul 00
Posts: 4520
Credit: 486,601
RAC: 0
United States
Message 142949 - Posted: 26 Jul 2005, 6:22:52 UTC

Today I started using the optimized clients available for Linux, both boinc and seti. It all appears to be working great with noticeable improvments as the first few wu's after the 'upgrade' processed through. I'm curious about one improvement provided by the boinc client. The cpu cache size on the Celeron Coppermine jumped from 256kb to 1mb.
Is this a real figure, or a pseudo-size compiled in to further improve things by making it appear bigger from the server's perspective? I thought the only way to get a bigger cache required a credit card and screwdriver. :)
ID: 142949 · Report as offensive
Pascal, K G
Volunteer tester
Avatar

Send message
Joined: 3 Apr 99
Posts: 2343
Credit: 150,491
RAC: 0
United States
Message 142954 - Posted: 26 Jul 2005, 6:40:13 UTC

That refers to the cache on the HD I believe.....
Semper Eadem
So long Paul, it has been a hell of a ride.

Park your ego's, fire up the computers, Science YES, Credits No.
ID: 142954 · Report as offensive
Scarecrow

Send message
Joined: 15 Jul 00
Posts: 4520
Credit: 486,601
RAC: 0
United States
Message 142969 - Posted: 26 Jul 2005, 7:04:55 UTC - in response to Message 142954.  
Last modified: 26 Jul 2005, 7:07:54 UTC

That refers to the cache on the HD I believe.....

I based the assumption on info displayed in the kboincspy program...

==
CPU: Celeron (Coppermine)
Cache: 976.34 MB on CPU or CPU module
Measured integer speed (Dhrystone): 2,078.95 MIPS
Measured floating point speed (Whetstone): 1,020.56 MFLOPS
==

The same large number appeared on the host detail page.

For fun, I just shut down boinc and seti and restarted it, now both the kboincspy info and that on the host info page show the expected, meager 128kb. I hadn't interrupted it since upgrading the client, so the strange numbers might have been some fallout from the initial benchmark run after the upgrade. Dang, that 1 meg cache did look good while it lasted. :)
ID: 142969 · Report as offensive
Ulrich Metzner
Volunteer tester
Avatar

Send message
Joined: 3 Jul 02
Posts: 1256
Credit: 13,565,513
RAC: 13
Germany
Message 142977 - Posted: 26 Jul 2005, 8:10:14 UTC
Last modified: 26 Jul 2005, 8:19:37 UTC

In older times, when the code wasn't able to determine the size of the 2nd level cache, it assumed a cache size of 1 or 2 MBytes. I presume, it's the same case here. Because of the optimized code the difference is not clearly detected by the benchmark code and therefore it assumes a 2nd level cache that big.
[edit]
I have a Pentium III-M 1.0 GHz with 512 KB 2nd level, a Pentium 4 1.8 GHz with 256 KB 2nd level and an Athlon TB 1.4 GHz with 256 KB 2nd level cache and all have a reported cache of 976.56 KB :) I think this is because i have an eye on fast memory, so the difference is not that big and not properly detected by the code.
Aloha, Uli

ID: 142977 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 143015 - Posted: 26 Jul 2005, 11:07:09 UTC

Don't feel bad ... it reports 1M cache for my Xeons when they have 2M ...
ID: 143015 · Report as offensive
Profile StokeyBob
Avatar

Send message
Joined: 31 Aug 03
Posts: 848
Credit: 2,218,691
RAC: 0
United States
Message 143330 - Posted: 26 Jul 2005, 23:16:32 UTC

I don't think this has any thing to do with anything optimized. I went poking around and it looked to me like everybody's says "cache of 976.56 KB".

At least if I'm looking where I think you are looking.
ID: 143330 · Report as offensive
TPR_Mojo
Volunteer tester

Send message
Joined: 18 Apr 00
Posts: 323
Credit: 7,001,052
RAC: 0
United Kingdom
Message 143377 - Posted: 27 Jul 2005, 0:31:36 UTC

Cache is OK for my processors.
I would guess you have found a weakness in whichever C library is called to report processor cache.
ID: 143377 · Report as offensive
Profile SoNic

Send message
Joined: 24 Dec 00
Posts: 140
Credit: 2,963,627
RAC: 0
Romania
Message 143465 - Posted: 27 Jul 2005, 2:23:05 UTC

All my processors have "cache of 976.56 KB". No discrimination here :)
ID: 143465 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 143537 - Posted: 27 Jul 2005, 3:59:26 UTC

even funnier is my G5 which has 256K L2 shows 1M ...


ID: 143537 · Report as offensive
Profile Paul D. Buck
Volunteer tester

Send message
Joined: 19 Jul 00
Posts: 3898
Credit: 1,158,042
RAC: 0
United States
Message 143538 - Posted: 27 Jul 2005, 3:59:27 UTC

even funnier is my G5 which has 256K L2 shows 1M ...


ID: 143538 · Report as offensive
Profile Thaddeus

Send message
Joined: 3 Sep 06
Posts: 2
Credit: 418,385
RAC: 0
United States
Message 426379 - Posted: 25 Sep 2006, 22:58:42 UTC

I also have this issue. I have a core 2 duo with 2m chache (allendale core)but boinc reports "Cache 976.56 KB". I dismissed this at first as 2 core's, 2m cache, 1m each. But I don't know afetr reading all these post's about cache reporting.
ID: 426379 · Report as offensive
Kim Vater
Volunteer tester

Send message
Joined: 27 May 99
Posts: 227
Credit: 22,743,307
RAC: 0
Norway
Message 426414 - Posted: 25 Sep 2006, 23:35:44 UTC
Last modified: 25 Sep 2006, 23:37:11 UTC

Same here with C2D Conroe (2x2MB cache).

All my host reports 976.56 KB cache ;-)

This "problem" has beeen discussed here in the forum several times.

Kiva
Greetings from Norway

Crunch3er & AK-V8 Inside
ID: 426414 · Report as offensive
Profile Benher
Volunteer developer
Volunteer tester

Send message
Joined: 25 Jul 99
Posts: 517
Credit: 465,152
RAC: 0
United States
Message 426721 - Posted: 26 Sep 2006, 16:17:14 UTC

There used to be code, once upon a time, to attempt to figure out how big the caches were. It wasn't very accurate...and was later dumped. However the display of cache on user's hosts was left. So they put a value in each host's info of 1 Million (but not 1024*1024 which is 1 Meg). So 1,000,000 divided by 1024 = 976.56
ID: 426721 · Report as offensive
Pepo
Volunteer tester
Avatar

Send message
Joined: 5 Aug 99
Posts: 308
Credit: 418,019
RAC: 0
Slovakia
Message 427810 - Posted: 28 Sep 2006, 14:49:47 UTC

What about using the value of HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\SecondLevelDataCache? Sure more reliable than 976.56kB.

Peter
ID: 427810 · Report as offensive
1mp0£173
Volunteer tester

Send message
Joined: 3 Apr 99
Posts: 8423
Credit: 356,897
RAC: 0
United States
Message 427867 - Posted: 28 Sep 2006, 17:45:31 UTC - in response to Message 427810.  

What about using the value of HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\SecondLevelDataCache? Sure more reliable than 976.56kB.

Peter

If you are only targeting Windows....
ID: 427867 · Report as offensive
Pepo
Volunteer tester
Avatar

Send message
Joined: 5 Aug 99
Posts: 308
Credit: 418,019
RAC: 0
Slovakia
Message 427906 - Posted: 28 Sep 2006, 19:51:43 UTC - in response to Message 427867.  
Last modified: 28 Sep 2006, 20:14:48 UTC

If you are only targeting Windows....

I've found many Linux hosts where it works and many where not, no idea why. Should grep cache /proc/cpuinfo work?. No idea about other Unices.

With the Wndows solution a high percentage of available hosts would be covered.

Peter
[totally edited/]
ID: 427906 · Report as offensive
Profile Benher
Volunteer developer
Volunteer tester

Send message
Joined: 25 Jul 99
Posts: 517
Credit: 465,152
RAC: 0
United States
Message 428308 - Posted: 29 Sep 2006, 18:11:52 UTC

My windows registry - for that value - displays 0 for both cores of my Athlon 64 X2 3800+.

I suspect Windows O/S is only using 1 or 2 of the 3 methods to gather Cache sizes (apparently not the AMD method).
ID: 428308 · Report as offensive
Pepo
Volunteer tester
Avatar

Send message
Joined: 5 Aug 99
Posts: 308
Credit: 418,019
RAC: 0
Slovakia
Message 428382 - Posted: 29 Sep 2006, 21:14:37 UTC

OK, Ben, you've got me!!

Few weeks ago I've found this link to some Intel devel area and while looking around I found some sources for detection of CPU characteristics (look around for WinCPUID library, down on the page, text "Download the source code for IA-32 and x64 platforms."), with small example app WinTestCPUID.

The source code seems to support HTs and multi-cores, AMDs, is older (non-CPUID) processors-aware, free of charge and maybe worth looking at. I could check the test app only on an Pentium-M, no older or newer or AMD or multi-core proc available.
ID: 428382 · Report as offensive
Kna

Send message
Joined: 14 Aug 03
Posts: 27
Credit: 3,344,578
RAC: 0
France
Message 428390 - Posted: 29 Sep 2006, 21:30:18 UTC - in response to Message 428308.  

My windows registry - for that value - displays 0 for both cores of my Athlon 64 X2 3800+.


0 is the default value, = 256 Ko L2
You can modify this value according to your CPU, 100 hexa / 512 decimal, etc

I suspect Windows O/S is only using 1 or 2 of the 3 methods to gather Cache sizes (apparently not the AMD method).


This SecondLevelDataCache registry key will be used ONLY if HAL is unable to identify L2 cache, mostly on ancient computers.

ID: 428390 · Report as offensive
Profile Benher
Volunteer developer
Volunteer tester

Send message
Joined: 25 Jul 99
Posts: 517
Credit: 465,152
RAC: 0
United States
Message 428433 - Posted: 29 Sep 2006, 23:12:55 UTC - in response to Message 428382.  

OK, Ben, you've got me!!

Few weeks ago I've found this link to some Intel devel area and while looking around I found some sources for detection of CPU characteristics (look around for WinCPUID library, down on the page, text "Download the source code for IA-32 and x64 platforms."), with small example app WinTestCPUID.

The source code seems to support HTs and multi-cores, AMDs, is older (non-CPUID) processors-aware, free of charge and maybe worth looking at. I could check the test app only on an Pentium-M, no older or newer or AMD or multi-core proc available.


Checked this library you referred to. It is only available in library form, not the source. So can't change the way it behaves. Its display found my multiple cores on the 64 X2 3800+ but not the cache (uses the intel CPUID[4] method only apparently).

Anywho, I've written a CPUID which will be in the newest Chicken optimized seti release. It finds all the versions. Will provide the source to Eric K at boinc if he wants it there also.

ID: 428433 · Report as offensive
1 · 2 · Next

Message boards : Number crunching : Boinc optimized client and CPU cache


 
©2025 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.