Microsoft Windows + The internet
Due to the amount of drone armies floating around, Its in my humble opinion that Microsoft Windows is a threat to national security.
Due to the amount of drone armies floating around, Its in my humble opinion that Microsoft Windows is a threat to national security.
Bruce Evans points out some intresting benchmarks on intel and a64:
Athlon XP 2100 (1.72 GHz):
libcstrlen: time spent executing strlen(string) = 64: 0.994755
asmstrlen: time spent executing strlen(string) = 64: 0.989012
basestrlen: time spent executing strlen(string) = 64: 0.879722
strlen: time spent executing strlen(string) = 64: 0.626727
strlen2: time spent executing strlen(string) = 64: 0.587162
P4 1.6 GHz:
libcstrlen: time spent executing strlen(string) = 64: 2.412558
asmstrlen: time spent executing strlen(string) = 64: 2.413904
basestrlen: time spent executing strlen(string) = 64: 1.049927
strlen: time spent executing strlen(string) = 64: 0.543575
strlen2: time spent executing strlen(string) = 64: 0.547015
PIII 450MHz:
libcstrlen: time spent executing strlen(string) = 64: 6.976066
asmstrlen: time spent executing strlen(string) = 64: 6.974106
basestrlen: time spent executing strlen(string) = 64: 3.464854
strlen: time spent executing strlen(string) = 64: 2.541872
strlen2: time spent executing strlen(string) = 64: 2.339469
Now rep scasb is only slightly slower than the simple C loop (since all
small loops take 2 cycles on AXP and A64…). strlen and strlen2 are
marginally faster since their loops do more.
basestrlen is fastest for lengths <= 5 on the Celeron.
basestrlen is fastest for lengths <= 9 on the A64.
After testing CS/CSS on Win2k8, Inital results are:
- 1000fps for both with no special configs needed (cept for sys_ticrate 10000 / fps_max 0)
- sleep() doesn’t have as much jitter (perhaps sleep is being serviced by HPET now)
Seems comcast has ordered a rather huge amount of level3 transit to offset their primary AT&T usage. Politics? Perhaps. Cheaper pricing? Who knows. Better network? I don’t know.
“Level 3 Communications Inc. of Broomfield entered a long-term agreement with with Philadelphia-based cable TV provider Comcast Corp.
Under the deal, Level 3 would provide Comcast with broadband infrastructure services to extend its fiber network in urban areas.
The agreement would span more than 19,000 route miles, covering 95 percent of Comcast’s national footprint with initial investment costs estimated at $100 million.
Comcast said the deal will enable it to deliver services such as video-on-demand, high definition TV, high-speed Internet access and advanced voice services”
People ask me things like
- Why are you so mean?
- How come you’re not nice to me?
- What’s with your abrasive attitude?
My general answer is, I’m not here to make friends, I’m here to make money. Last job I took I became friends and I got into a bunch of political bullshit that was unnecessary, and I got fired.
- I’m not here to hang out with you because we work for the same company
- I’m not here to talk to you about your girl problems
- I’m not here to talk to you about other issues that do not pertain to work.
If you want my respect, don’t be a moron. Common sense goes a long way in life.
Opteron 275:
nothing: 8 cycles
locked add: 6 cycles
cpuid: 61 cycles
Intel Woodcrest:
nothing: 60 cycles
locked add: 72 cycles
cpuid: 264 cycles
#include <stdio.h> #include <time.h> #include <sys/time.h> #define rdtsc(low) \ __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx") #define TIME(x,y) \ min = 100000; \ for (i = 0; i < 1000; i++) { \ unsigned long start,end; \ rdtsc(start); \ x; \ rdtsc(end); \ end -= start; \ if (end < min) \ min = end; \ } \ printf(y ": %d cycles\n", min); #define LOCK asm volatile("lock ; addl $0,0(%esp)") #define CPUID asm volatile("cpuid": : :"ax", "dx", "cx", "bx") #if 0 #define GTOD gettimeofday (&tvstart, NULL); gettimeofday (&tvstop, NULL) #endif int main() { struct timeval tvstart, tvstop; unsigned long min; int i; #if 0 TIME(GTOD, "gettimeofday start/stop:"); #endif TIME(/* */, "nothing:"); TIME(LOCK, "locked add:"); TIME(CPUID, "cpuid:"); }
Here’s something else that I use to measure timing functions under FreeBSD.
#include <stdio.h> #include <sys/time.h> #define rdtsc(low) \ __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx") #define TIME(x,y) \ min = 100000; \ for (i = 0; i < 1000; i++) { \ unsigned long start,end; \ rdtsc(start); \ x; \ rdtsc(end); \ end -= start; \ if (end < min) \ min = end; \ } \ printf(y ": %d cycles\n", min); #define LOCK asm volatile("lock ; addl $0,0(%esp)") #define CPUID asm volatile("cpuid": : :"ax", "dx", "cx", "bx") #define GTOD1 gettimeofday(&one, NULL) #define GTOD2 gettimeofday(&one, NULL); gettimeofday(&two, NULL) int main() { unsigned long min; int i; struct timeval one, two; TIME(/* */, "nothing"); TIME(LOCK, "locked add"); TIME(CPUID, "cpuid"); TIME(GTOD1, "gettimeofday"); TIME(GTOD2, "gettimeofday start/stop"); }
A few years ago, there we a couple of game server providers. Now it seems there 10 starting up every day.
The people that run the new ones are total morons, and they make me sick with their copy-and-paste of other sites’ network pages. I would NEVER brag about having telia, T-Systems, Verio or Cogent as upstream transit. There isn’t 1 kiddie GSP that has any BGP knowledge, they are straight layer2 except for a small amount (can count them on 1 hand).
I use this to measure gettimeofday()’s latency on my FreeBSD stuff. Use it as you like, for you newbs you’ll need stdio and time.h, this should compile fine on linux.
/*- * Copyright (c) 2007 Gary Stanley <gary@velocity-servers.net> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include <time.h> #include <stdio.h> #include <sys/time.h> /* * This measures latency of gettimeofday and clock_gettime * With TSC i get the best results, AMD and Intel * I get the worst results with 8254 and ACPI-{fast,slow} * HPET is around 1200 cycles, which almost as slow as ACPI */ int main(void) { int i, tvusecs, tsusecs; struct timeval tvstart, tvstop; struct timespec tsstart, tsstop; gettimeofday (&tvstart, NULL); for (i = 0; i < 1000; i++) gettimeofday (&tvstop, NULL); clock_gettime (CLOCK_REALTIME, &tsstart); for (i = 0; i < 1000; i++) clock_gettime (CLOCK_REALTIME, &tsstop); tvusecs = ((tvstop.tv_sec - tvstart.tv_sec) * 1000000) + (tvstop.tv_usec - tvstart.tv_usec); tsusecs = ((tsstop.tv_sec - tsstart.tv_sec) * 1000000) + ((tsstop.tv_nsec - tsstart.tv_nsec) / 1000); printf ("1000 gettimeofday()'s = %d usecs; ~ %d usecs each\n", tvusecs, tvusecs / 1000); printf ("1000 clock_gettime()'s = %d usecs; ~ %d usecs each\n", tsusecs, tsusecs / 1000); return 0; }