Beruflich Dokumente
Kultur Dokumente
Service on MySQL
Cybozu Labs, Inc.
Kazuho Oku
Background
Main Server
Opteron 2218 x2, 64GB Mem
MySQL, Apache
Fulltext Search Server
Opteron 240EE, 2GB Mem, Intel SSD
MySQL (w. Tritonn/Senna)
Helper Servers
for Content Analysis
for Screenshot Generation
Apr. 23 2009 Running Realtime Stats Service on MySQL 11
The Long Tail of the Internet
-0.44
y=C・x
# of URLs with 1/10 hits: x2.75
The Challenges:
URLs are too short for gzip, etc.
URLs should be prefix-searchable in compressed
form
How to run like 'http://www.mysql.com/%' on a
compressed URL?
The Answer:
Static PPM + Range Coder
Change schema
url varchar(255) not null # with unique index
↓
urlc varbinary(767) not null # with unique index
my $LOAD = 0.25;
while (true) {
my $start = time();
precompute_block();
sleep(min(time - $start, 0) * (1 - $LOAD) / $LOAD);
}
tinyurl.com/kazuho