Cache line width

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Cache line width

Post by mcostalba »

Where can I find the width of the cache line for the various processors?

I have found only the specs for the K8 family here (64 bytes of cache line):

http://en.wikipedia.org/wiki/CPU_cache

Could someone please give me some link to this info ?

Thanks
Marco
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: Cache line width

Post by Aleks Peshkov »

All modern x86 CPUs of all vendors have 64 bytes per line. http://www.agner.org/optimize/#manuals
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Cache line width

Post by mcostalba »

Aleks Peshkov wrote:All modern x86 CPUs of all vendors have 64 bytes per line. http://www.agner.org/optimize/#manuals
Thanks for the link, very appreciated.

But at least Intel® Xeon® cache line seems to be 128 bytes

"For instance, cache lines for Intel® Xeon® processor are laid out in 128 byte lines that always start at an address that is a multiple of 0x80"

The above is extracted from:
http://software.intel.com/en-us/articles/false-sharing/
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: Cache line width

Post by Gian-Carlo Pascutto »

P4 (Xeon) had 128 byte cacheline size.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Cache line width

Post by bob »

Gian-Carlo Pascutto wrote:P4 (Xeon) had 128 byte cacheline size.
and 32 L1 cache line size if memory serves... There were a few editions of the pentium-pro architecture that had 32byte l1, and then 64/128 L2.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Cache line width

Post by mcostalba »

bob wrote:
Gian-Carlo Pascutto wrote:P4 (Xeon) had 128 byte cacheline size.
and 32 L1 cache line size if memory serves... There were a few editions of the pentium-pro architecture that had 32byte l1, and then 64/128 L2.
Perhaps CPU with very long cache lines are mainly intended for single core systems, where big cache lines are a good thing and don't have issues due to SMP.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Cache line width

Post by bob »

mcostalba wrote:
bob wrote:
Gian-Carlo Pascutto wrote:P4 (Xeon) had 128 byte cacheline size.
and 32 L1 cache line size if memory serves... There were a few editions of the pentium-pro architecture that had 32byte l1, and then 64/128 L2.
Perhaps CPU with very long cache lines are mainly intended for single core systems, where big cache lines are a good thing and don't have issues due to SMP.
I think it came along as a support for RAMBUS, which died a well-deserved death.
mathmoi
Posts: 286
Joined: Mon Mar 13, 2006 5:23 pm
Location: Québec

Re: Cache line width

Post by mathmoi »

Hi Marco,

On Linux you can check in /proc/cpuinfo. In this questions on stackoverflow.com I asked this very question and got some answers : http://stackoverflow.com/questions/1502 ... -size-in-c
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Cache line width

Post by wgarvin »

mcostalba wrote:
bob wrote:
Gian-Carlo Pascutto wrote:P4 (Xeon) had 128 byte cacheline size.
and 32 L1 cache line size if memory serves... There were a few editions of the pentium-pro architecture that had 32byte l1, and then 64/128 L2.
Perhaps CPU with very long cache lines are mainly intended for single core systems, where big cache lines are a good thing and don't have issues due to SMP.
The 3 PowerPC cores of the Xbox360 and the PPU of the PS3's Cell processor both use 128-byte cachelines throughout (L1 and L2).
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Cache line width

Post by mcostalba »

mathmoi wrote:Hi Marco,

On Linux you can check in /proc/cpuinfo. In this questions on stackoverflow.com I asked this very question and got some answers : http://stackoverflow.com/questions/1502 ... -size-in-c
Thanks for the link !

I didn't know that site, it is an interesting one.