Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #448152
| Newsgroups | comp.os.linux.advocacy |
|---|---|
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
| Subject | Re: A page fault can cost ONE MILLION CLOCK CYCLES. |
| References | (1 earlier) <paiku402uik@news7.newsguy.com> <sa0b803g.aho93@rooftop.invalid> <pakkh202pf6@news4.newsguy.com> <9a0b80tr.ahu34@rooftop.invalid> <Jeff-Relf.Me@Apr.11--0.09pm.Seattle.2018> |
| Message-ID | <SitzC.428549$qo7.321660@fx04.am4> (permalink) |
| Organization | usenet-news.net |
| Date | 2018-04-11 19:25 +0000 |
On 2018-04-11, Jeff-Relf.Me @. <Jeff-Relf.Me@> wrote:
>> My guess is that the option predates L3 cache and refers
>> to highest level cache, whatever it might be called.
>>
>> Some CPUs have l4 cache now, and in that case the l2 param
>> might refer to l4.
>
> My CPU, the i7-5775c, has a 128 MegaByte L-4 cache,
> a.k.a. "Crystal Well" ( 1.8 GigaHz eDRAM ).
>
> Fabian got ( pa92ch01sun@news1.newsguy.com ):
>
> Loop 1: 3.01377 seconds
> Loop 2: .11461 seconds
>
> I get:
>
> Loop 1: 2.434 seconds
> Loop 2: .089 seconds ( 2.434 / .089 = 27 )
>
> Owl got ( 9a0b773q.u9b@rooftop.invalid ):
>
> Loop 1: 4.64766 seconds Minor page faults: 262,211
> Loop 2: .32333 seconds Minor page faults: 262,215 [ Why more ? ]
>
> Quoting "Docs.MicroSoft.COM/en-us/cpp/build/reference/Tips-for-Improving-Time-Critical-Code"
>
> A CPU cache hit can cost your program 10 to 20 clock cycles.
> An external cache hit can cost 20 to 40 clock cycles.
> A page fault can cost ONE MILLION CLOCK CYCLES.
Here's mine:
~/News >>> perf stat -d ./fabtard1
Run Time Loop 2: 0.32717 seconds
Performance counter stats for './fabtard1':
359.808366 task-clock:u (msec) # 0.999 CPUs utilized
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
262,193 page-faults:u # 0.729 M/sec
465,102,033 cycles:u # 1.293 GHz (49.98%)
1,073,726,594 instructions:u # 2.31 insn per cycle (62.48%)
269,666,155 branches:u # 749.472 M/sec (62.48%)
23,418 branch-misses:u # 0.01% of all branches (62.49%)
532,483 L1-dcache-loads:u # 1.480 M/sec (61.79%)
75,502 L1-dcache-load-misses:u # 14.18% of all L1-dcache hits (25.02%)
27,150 LLC-loads:u # 0.075 M/sec (25.01%)
20,763 LLC-load-misses:u # 76.48% of all LL-cache hits (37.51%)
0.360062742 seconds time elapsed
~/News >>> perf stat -d ./fabtard2
Run Time Loop 1: 3.65935 seconds
Performance counter stats for './fabtard2':
3727.861715 task-clock:u (msec) # 1.000 CPUs utilized
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
262,193 page-faults:u # 0.070 M/sec
13,282,524,905 cycles:u # 3.563 GHz (50.00%)
1,073,185,437 instructions:u # 0.08 insn per cycle (62.50%)
268,571,803 branches:u # 72.044 M/sec (62.50%)
24,326 branch-misses:u # 0.01% of all branches (62.50%)
548,175 L1-dcache-loads:u # 0.147 M/sec (62.43%)
538,498,716 L1-dcache-load-misses:u # 98234.82% of all L1-dcache hits (25.00%)
152,304,851 LLC-loads:u # 40.856 M/sec (25.00%)
4,648,176 LLC-load-misses:u # 3.05% of all LL-cache hits (37.50%)
3.728265590 seconds time elapsed
--
press any key to continue or any other to quit...
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-08 15:29 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 10:51 -0700
Re: Gentoo is *BEST* GNU/Linux Melzzzzz <Melzzzzz@zzzzz.com> - 2018-04-08 19:36 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 12:41 -0700
Re: Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-08 20:03 +0000
Re: Gentoo is *BEST* GNU/Linux Melzzzzz <Melzzzzz@zzzzz.com> - 2018-04-08 20:22 +0000
Re: Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-08 21:06 +0000
Re: Gentoo is *BEST* GNU/Linux owl <owl@rooftop.invalid> - 2018-04-08 21:02 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 14:31 -0700
Re: Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-08 22:03 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 15:18 -0700
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 20:00 -0700
Re: Gentoo is *BEST* GNU/Linux owl <owl@rooftop.invalid> - 2018-04-08 23:47 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-08 17:09 -0700
Re: Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-10 15:23 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-10 11:35 -0700
Re: Gentoo is *BEST* GNU/Linux owl <owl@rooftop.invalid> - 2018-04-10 20:31 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-10 21:53 -0700
Re: Gentoo is *BEST* GNU/Linux "F. Russell" <fr@random.info> - 2018-04-11 09:29 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-11 03:35 -0700
Re: Gentoo is *BEST* GNU/Linux owl <owl@rooftop.invalid> - 2018-04-11 12:21 +0000
Re: Gentoo is *BEST* GNU/Linux Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-11 06:43 -0700
A page fault can cost ONE MILLION CLOCK CYCLES. Jeff-Relf.Me @. - 2018-04-11 12:09 -0700
Re: A page fault can cost ONE MILLION CLOCK CYCLES. Melzzzzz <Melzzzzz@zzzzz.com> - 2018-04-11 19:25 +0000
Re: A page fault can cost ONE MILLION CLOCK CYCLES. Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-12 02:24 -0700
Re: A page fault can cost ONE MILLION CLOCK CYCLES. Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-12 06:51 -0700
365 Million L3 Misses. Jeff-Relf.Me @. - 2018-04-14 07:58 -0700
Re: 365 Million L3 Misses. Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-14 08:48 -0700
Re: A page fault can cost ONE MILLION CLOCK CYCLES. Steven Petruzzellis <frelwizzen@gmail.com> - 2018-04-11 21:59 -0700
Re: Gentoo is *BEST* GNU/Linux owl <owl@rooftop.invalid> - 2018-04-11 13:14 +0000
csiph-web