Обсуждение: Re: [PATCHES] update i386 spinlock for hyperthreading
Hi Manfred, I'm using unixware 7 but couldn't compile your source with native cc, I had to compile it with gcc. here are the results: Script started on Sat Dec 27 17:50:49 2003 /tmp 17:50:50: ./a.out MOVETEST called by non-superuser, running with normal priority. zerotest: -1073736628 ticks; zerotest: -4372 ticks; zerotest: -52 ticks; rep nop: 508 ticks; rep nop: 88 ticks; rep nop: 60 ticks; nop: 256 ticks; nop: 224 ticks; nop: 92 ticks; nop: 64 ticks; nop: 12 ticks; nop: 8 ticks; nop: 0 ticks; nop: -4 ticks; rep nop: 56 ticks; rep nop: 44 ticks; rep nop: 40 ticks; zerotest: -4 ticks; rep nop: 24 ticks; zerotest: -4 ticks; nop: 0 ticks; zerotest: -4 ticks; nop: -8 ticks; zerotest: -8 ticks; rep nop: 32 ticks; nop: -16 ticks; zerotest: -4 ticks; zerotest: -4 ticks; rep nop: 24 ticks; zerotest: -4 ticks; nop: -12 ticks; ^? /tmp 17:53:34: exit script done on Sat Dec 27 17:53:38 2003 Regards On Sat, 27 Dec 2003, Manfred Spraul wrote: > Date: Sat, 27 Dec 2003 12:22:45 +0100 > From: Manfred Spraul <manfred@colorfullife.com> > To: ohp@pyrenet.fr > Subject: Re: [PATCHES] update i386 spinlock for hyperthreading > > Hi Olivier, > > I have attached rep_nop.cpp. It's a simple C program (unfortunately > filled with linux specific gccisms) that benchmarks the time for a > single rep;nop instruction, compared to a normal nop and nothing at all. > > Which OS do you use? I can try to build an app for FreeBSD, and it > should be possible to compile it under Windows with cygwin as well. > > Under Linux: > $ gcc -O2 -o rep_nop rep_nop.cpp > $ ./rep_nop > > Just run in for a few seconds and send back the output. Please add the > mailing list back into the cc list. > -- > Manfred > -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) 6, Chemin d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: ohp@pyrenet.fr ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery)
ohp@pyrenet.fr wrote: >Hi Manfred, > >I'm using unixware 7 but couldn't compile your source with native cc, I >had to compile it with gcc. > >here are the results: > > Thanks. The test app compares the time needed for three different short loops: a loop with six empty function calls, a loop with six function calls and one nop in the middle, and a loop with a "rep;nop;" in the middle. Result: - nop needs 0 cycles - executed in parallel. - rep;nop between 24 and 60 cycles - long enough that the pipeline is emptied. I've searched around for further info regarding the recommended spinlock algorithm: - The optimization manual (google for "Intel 248966") contains a section about pause instructions: The memory ordering violation is from the multiple simultaneous reads that are executed due to pipelining the busy loop. - It references the Application Note AP-949 "Using Spin-Loops on Intel Pentium 4 Processor and Intel Xeon Processor" for further details. Unfortunately the app notes are stored on cedar.intel.com, and that server appears to be down :-( -- Manfred
How do you connect to postgres if it is running on a different machine. I am looking for a telnet command in place of postmaster -D data
In postgresql.conf the first entry should be something like 'tcpip'. Set it to 'true'. That's the equivalent of the postmaster -D. HTH, -Tony ogeer@cs.queensu.ca (Nailah Ogeer) wrote in message news:<Pine.SOL.4.33.0312271407030.3848-100000@innovate>... > How do you connect to postgres if it is running on a different machine. I > am looking for a telnet command in place of postmaster -D data > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
El Sáb 27 Dic 2003 16:08, Nailah Ogeer escribió: > How do you connect to postgres if it is running on a different machine. I > am looking for a telnet command in place of postmaster -D data Depends on what you want to do. One way arounf would be: 1) Edit the pg_hba.conf where the PG server is running so that you can actually connect to the DB. 2) Run this: $ psql -d database -h host -U user where database, host and user are self explained. :-) If what you want is something different please explain yourself. -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telemática Universidad Nacional del Litoral -----------------------------------------------------------------