Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 23 Sep 2002 14:15:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 23 Sep 2002 14:15:59 -0400 Received: from ophelia.ess.nec.de ([193.141.139.8]:59583 "EHLO ophelia.ess.nec.de") by vger.kernel.org with ESMTP id ; Mon, 23 Sep 2002 14:15:56 -0400 From: Erich Focht To: "Martin J. Bligh" , William Lee Irwin III Subject: node affine NUMA scheduler: simple benchmark Date: Mon, 23 Sep 2002 20:19:55 +0200 User-Agent: KMail/1.4.1 Cc: linux-kernel , LSE , Ingo Molnar , Michael Hohnbaum References: <200209221030.32323.efocht@ess.nec.de> <78206124.1032689516@[10.10.2.3]> In-Reply-To: <78206124.1032689516@[10.10.2.3]> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_7LLWHE2EB2RRQH1F9G5F" Message-Id: <200209232019.55119.efocht@ess.nec.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6890 Lines: 172 --------------Boundary-00=_7LLWHE2EB2RRQH1F9G5F Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Here is a simple benchmark which is NUMA sensitive and simulates a simple but normal situation in an environment running number crunching jobs. It starts N independent tasks which access a large array in a random manner. This is both bandwidth and latency sensitive. The output shows on which node(s) the tasks have spent their lives. Additionally it shows (on a NUMA scheduler kernel) the homenode (iSched). Could you please run it on the virgin kernel and on the "Both numasched patches, hack node IDs, alloc from current->node" one? Maybe we see what's wrong... Thanks, Erich --------------Boundary-00=_7LLWHE2EB2RRQH1F9G5F Content-Type: application/x-shellscript; name="rand_updt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="rand_updt" #!/bin/bash # # Small synthetic benchmark sensitive to both memory # access latency and memory bandwidth. The perl script # starts NTASKS processes in parallel which access their # memory following a random pattern. # # This benchmark is thought as test for the capability of # ccNUMA platforms to provide minimum memory access latency # and maximize the memory bandwidth available for the # processes in parallel. The table printed after all NTASKS # processes finished to run shows the percentage of time # spent by the "jobs" on each node. It also outputs the # node on which the job was initially scheduled and the node on # which the job spent most of its time (iSched, MSched). If # these are different, an asterisc is printed. # Ideally most of the time should be spent on the node where the # memory is allocated. # # Copyright 2001, Erich Focht # if [ $# != "1" ]; then echo "$#" echo "Usage: $0 NTASKS" exit 1 fi NTASKS=$1 PROBLEMSIZE=1000000 tmpdir=rupdt_$$ #################### if [ ! -f cpu_to_node ]; then echo "Please create a file called cpu_to_node in the current directory!" echo "It must contain the node numbers for each logical CPU in the system," echo "separated by blanks. For example: 4 nodes of 4 cpus each could" echo "look like:" echo "echo \"0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3\" >cpu_to_node" exit 1 fi mkdir $tmpdir || { echo "Could not create run directory!"; exit 1; } cd $tmpdir cp ../cpu_to_node . uudecode << 'UUU_EOF' begin 644 randupdt.c.bz2 M0EIH.3%!629368@X[W<``4S?@%`0>__U7S^GWDZ__]_Z4`/\]Y>TGB=1K3KP M2A(4]3TF1IH]09J-IE-E!IH`T-`>F4:`-3U(Q3R#2>AJGJ9-`/4``&0:```& MFA3"";2I[0$TF0](T`R`/2:&U!Z0`D20HT/4P0T]0&C0R````!H--!*:B--, MDIZ>FC4GZ*>4\IZGJ/4;*``-J&@!II))%0&,-6,;E$!GQ#;&AADS532E#<)S M-&E(@;%<,YL_NB/N>BFE04LN*>DH21.Q)$Z2(N',`9MARV$L#ER3U:JP.:GJ M>._6O(N@6:WST8K*P/>8]J_?GK&]]*-H;A?ADLQOGSV/$?;BKS26"U7-P=+S MDD*B&`X0=DLK@3-M?&\!&VDEK[GLK=ZY;0SLFHC41'$"$$A#D$`0# MDS+1/N'UA\HLPF1<;L3?JIUJVQ%P&]!\'5K'-P2R"58PXZ)^H/$G2.;EI0HP4\%VAO%X*;MCR74L7E5-+!,V+K&(IFU,!@4'>+$F!&5 M?+4^[D@R1(TF[BK%`*L-MH4`?#PWVU"#/I=8[;VP.HA@F""NJY?D;049#W%2 MH?3,BZ30/E8R/CV4J8I'6C5IK6PA5PXC!CF MY.-Z[J%*D#,DY+I/(-I3-S>!DX9>G#W*.L6$:K=^!$1Z2,@XV'5TH*KRW0U' M=,O)(LM?S$C=.;'=B%OSS,4K.)P6FD>/(>B1N-` M&!L.O.(7);<;,=HW("<7&BRT"UF1&602:INX-H M=N^NQ[5DQ-65=C#VH[9`X"'@/$*A!#^3-K$>:K@)"5J7*W+&R=H@B(0NG%\< MP(^6@(MGX!&53;6FB2;H:@@2M-=Q7+B@[PICS4!?4A%XF'&-LFBM^\ID7BVZ M<\2`W3%@W9'$\305*#UWI0PR$)/?-$,%HNM54"-"AP(9:NL:HUCOSBDE):]! M.112($S/9ZNQTL4:5$@Z)!8ZXG.!<:@O@1-7K'"LN-\MD6'KYM"3-2PRS9KT 4!@59-YB;54(?^+N2*<*$A$''>[@` ` end UUU_EOF bzip2 -d randupdt.c.bz2 gcc -O3 -o randupdt randupdt.c ############################ cat >print_hz.c < int main(){ printf("%d\n",HZ);} EOF gcc -o print_hz print_hz.c ############################ uudecode << 'UUU_EOF' begin 644 dispatch.bz2 M0EIH.3%!629364BQHA<``:C?@&!\?O_[/^_SWQ^_____8`8\^O=UYO9=JK=R M:][=&6M=:X--(*:933T$T],J>:FGHF*/4S4])HTR,GJ8(PRCQ1D]!*":%,"I MZFVD1A`T/4-&@`-!H``!HT#0T2H9J/4!B#0``:&)D`&@`#0`$B(B:)-/)DU- M-&$9J!H`TR#(:!ZFF@`/4'#0R::&F1H:9&09&1H9`8FC)H`R9&(82(DU-,1, M1I3]HBGY"GE/4#(\H,@`#1H;4!II:A&5H18DD?S:;3?(\M#6)7!B/MS131?( M3;9,Q+8P@:;#8<)C9+$P9#1S7_O-WXNN96EL0YK1A*B9A@2RE/IH4+!Q;&JD M!I$@"MK1JD.&V0S/,3$-):>,UZV:+;VEGND.?CY;G@K$U.M$2B058DY6,^+M M%MS;\`?*C2'N7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