# Re-installing Grub when MS Windows Destroyed It

I have now done it a couple of times, but always have to look it up. Here are the steps to re-install Grub from a live Ubuntu CD, when you have Windows and Linux on your hard disk. You must be root, or run these commands with sudo. Change /dev/sdaXY accordingly.

1. mount /dev/sda2 /mnt
2. mount /dev/sda3 /mnt/boot, if you have a separate boot partition
3. mount -o bind /dev /mnt/dev
4. mount -o bind /sys /mnt/sys
5. mount -t proc /proc /mnt/proc
6. chroot /mnt /bin/bash
7. grub-install /dev/sda

Above commands are from method 3 in GRUB (in German).

# Gil Kalai on Zhang’s Breakthrough in Number Theory

Below I copy some paragraphs from a recent article in Polymath 8 – a Success! | Combinatorics and more by Gil Kalai on Zhang’s breakthrough regarding prime numbers:

Twin primes are two primes $p$ and $p+2$. The ancient twin prime conjecture asserts that there are infinitely many twin primes. (This conjecture is still not proved.) The prime number theorem asserts that there are (asymptotically) $n/\log n$ primes whose value is smaller than a positive integer n, and this implies that we can find arbitrary large pairs of consecutive primes  $p$ and $q$ such that $q-p$ is at most $(\log p)$. Until a few years ago nothing asymptotically better was known. Goldston, Pintz, and Yıldırım (GPY), showed in 2005 that there infinitely many pairs of primes $p$ and $q$ such that $q-p$ is $O(\sqrt{\log n})$. A crucial idea was to derive information on gaps of primes from the distribution of primes in arithmetic progressions. GPY showed that conditioned on the Elliott-Halberstam conjecture (EHC) there are infinitely many primes of bounded gaps (going all the way to 16, depending on a certain parameter in the conjecture, but not to 2). Yitang Zhang did not prove the EHC but based on further understanding of the situation found a way to shortcut the conjecture and to prove that there are infinitely many primes with bounded gaps unconditionally!

Gil Kalai goes on: Here is a very nice 2007 survey article by Kannan Soundararajan on this general area of research and the GPY breakthrough.

Now some astonishing facts on Yitang Zhang from the English Wikipedia: After graduation, Zhang had a hard time finding an academic position. In a recent article, Zhang’s thesis advisor, Professor Tzuong-Tsieng Moh, recalled that “Sometimes I regretted not ﬁxing him a job” and “He never came back to me requesting recommendation letters.” He managed to find a position as a lecturer after many years. He is still currently a lecturer at the University of New Hampshire, where he was hired by Kenneth Appel back in 1999. Prior to getting back to academia, he worked for several years as an accountant and a delivery worker for a New York City restaurant. He also worked in a motel in Kentucky and in a Subway sandwich shop.

Added 01-Jan-2014: Unheralded Mathematician Bridges the Prime Gap.

# dotScale 2013 MySQL Talk

Very interesting talk on the scaling challenge at WordPress.com given by Barry Abrahamson, CTO of WordPress.

Some key points:

1. 500 million database tables
2. 3 data centers in USA
3. 400.000 shards moved per day
4. storage on SSD
5. ~10% of total infrastructure costs are related to backups
6. ~500 GB / shard
7. 50 million sites
8. 2.200 servers, and 500 database servers

Compare this with infrastructure costs for WordPress.

In June, I gave a talk at the dotScale conference in Paris about WordPress.com’s MySQL database architecture and infrastructure. The video is now online:

View original post

# WordPress/Automattic: Monthly Unique Visits and Employees

Below table is from work-with-us (data as of 22-Sep-2013): One of these things is not like the other.

Company Name Monthly Uniques (US) Employees
WordPress.com 122M 195
eBay.com 84M 31,500
Amazon.com 79M 88,400
Yahoo.com 70M 11,700
AOL.com 35M 5,660

# Georg Hager’s Blog: Intel vs. GCC for the OpenMP vector triad: Barrier shootout!

Georg Hager’s Blog posted an illustrative article on icc versus g++ performance w.r.t. OpenMP. Dr. Georg Hager is one of the authors of Introduction to High Performance Computing for Scientists and Engineers.

Measurement of

double precision, dimension(N) :: a,b,c,d
! initialization etc. omitted
s = walltime()
!$omp parallel private(R,i) do R=1,NITER !$omp do
do i=1,N
a(i) = b(i) + c(i) * d(i)
enddo
!$omp end do enddo !$omp end parallel
e=walltime()
MFlops = R*N/(e-s)/1.e6


gives