Showing entries 28983 to 28992 of 44105
« 10 Newer Entries | 10 Older Entries »
gperf to generate the lex hash == WIN

A couple of days ago, while fighting with removing warnings from the Sun Studio build of Drizzle, I got frustrated and took a break to tackle one of the little things I've been wanting to do for a while.

Delete gen_lex_hash

(Just in case gen_lex_hash means nothing to you, it's a tool in the MySQL and Drizzle source tree that creates hash structures containing the reserved symbols for easy lookup during parsing)

Now, don't get me wrong. It's not that I have anything in particular against the code in gen_lex_hash. It's more of an annoyance about building and using a custom code-generation tool when there is a perfectly good general purpose one out there in the Free Software universe.

I replaced gen_lex_hash with gperf, which is a GNU tool for generating perfect hashes. There are several wins here:

  1. We have no more tools that must be …
[Read more]
gperf to generate the lex hash == WIN

A couple of days ago, while fighting with removing warnings from the Sun Studio build of Drizzle, I got frustrated and took a break to tackle one of the little things I've been wanting to do for a while.

Delete gen_lex_hash

(Just in case gen_lex_hash means nothing to you, it's a tool in the MySQL and Drizzle source tree that creates hash structures containing the reserved symbols for easy lookup during parsing)

Now, don't get me wrong. It's not that I have anything in particular against the code in gen_lex_hash. It's more of an annoyance about building and using a custom code-generation tool when there is a perfectly good general purpose one out there in the Free Software universe.

I replaced gen_lex_hash with gperf, which is a GNU tool for generating perfect hashes. There are several wins here:

  1. We have no more tools that must be …
[Read more]
Facebook app creation: A look at the MySQL Quiz. part II

To those of you having a hard time finding the MySQLQuiz, please give the folks at Facebook a little more time to get it into their search. Sorry, I should have submitted a few days before the previous post to make sure that the MySQL Quiz was easy to find.

In the previous post, a very simple Facebook application was shown.

The next part of the MySQL Quiz application was to randomly pick unique questions from the database of quiz questions.

The first step was to get the number of questions in a rapidly expanding database. I will keep the PHP fairly simple :

$result = mysql_query("SELECT count(*) FROM fb.quiz");

$row = mysql_fetch_array($result);

$randomMax = $row[0];



Next was creating an array to hold the randomly picked, unique id numbers. The quiz uses …

[Read more]
gperf to generate the lex hash == WIN

A couple of days ago, while fighting with removing warnings from the Sun Studio build of Drizzle, I got frustrated and took a break to tackle one of the little things I've been wanting to do for a while.

Delete gen_lex_hash

(Just in case gen_lex_hash means nothing to you, it's a tool in the MySQL and Drizzle source tree that creates hash structures containing the reserved symbols for easy lookup during parsing)

Now, don't get me wrong. It's not that I have anything in particular against the code in gen_lex_hash. It's more of an annoyance about building and using a custom code-generation tool when there is a perfectly good general purpose one out there in the Free Software universe.

I replaced gen_lex_hash with gperf, which is a GNU tool for generating perfect hashes. There are several wins here:

  1. We have no more tools that must be …
[Read more]
Maria trundles the tokutek challenge

So I saw the tokutek challenge, and wondered to myself how Maria would get along with it. I duly downloaded a 6.0 tree, and the iiBench code, tinkered with it to make it actually build, and fired things up.

I watched it closely, for about a day, then got bored and forgot about it. I remembered today that I should take a look!

CPU Usage (Quad Core)

Average rows per second inserted

Load Averages

You can …

[Read more]
How to reduce load and response time in PHP in five minutes

Request time is proportional to server load. If the application response time is big so will be the server's load. To reduce server load, reduce the wait time in the application's response time to serve the request. Below are some steps that I took to remove 1.8 ms overhead on every request to my web server farm.


Tools Needed:
vi
strace
top

Use vi to look at your include path in php.init.
Next use top to find which apache process is consuming the most cpu resources.
Use strace -p [TOP HTTPD PROCESS] -T (-T is for deltas).

In my example the include path is
/usr/share/pear:/usr/lib64/pear:.:/var/www/html/httdocs/


lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 <0.000033>
lstat("/usr/share", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 <0.000034>
lstat("/usr/share/pear", {st_mode=S_IFDIR|0755, …
[Read more]
Missing Speakers in MySQL Conference 2009

I was looking through the list of speakers in this year's MySQL Conference and I just noticed that some good speakers will not be presenting in the conference. Well, the term 'good speakers' is relative, but I enjoyed listening to their presentations.

This is my list of the 'Missing' speakers for this year.

1. Baron Schwartz
2. Peter Zaitsev
3. Jay Pipes
4. Jeremy Cole
5. Arjen Lentz

I guess they are too busy with other stuff.

Thoughts on Replication from 2 Feb SFO MeetUp (slides too)

Last night I gave a presentation on Tungsten Replicator to the SFO MySQL MeetUp. It was really fun--lots of excellent questions and ideas from an audience that knows MySQL in and out. Here are slides from the talk from our trusty S3 document repository.

There were many things to think about on the BART ride home to Berkeley but here are a couple that really struck me, in part because I think we can do something about them.

First, database replication needs to expose as much monitoring data as possible. The kind of data you get or can infer from SHOW SLAVE STATUS is just the beginning. This came through really strongly from people like Erin who are using load-balancers and other automated techniques for distributing load to replicas using decision criteria like availability and latency of slaves. We have …

[Read more]
We’re Hiring Again

I’ve said before that Message Systems is the best place I’ve worked so far, and we’re looking for more people to join the team.

We’re looking for the following roles:

[Read more]
More information about running MySQL on Open HA Cluster / Solaris Cluster


A while ago we published an interview with Detlef Ulherr and Thorsten Früauf about Solaris Cluster / OpenHA Cluster on the MySQL Developer Zone.

We received a number of followup questions from our readers, requesting more technical background information. For example, Mark Callaghan was wondering about the following:

  • How is failure detection done?
  • How is promotion of a slave to the master done after failure detection?
  • How are other slaves failed to the new master?

I asked Detlef to elaborate some more on the technical details of this solution. Here's his very exhaustive reply, thank you very much, Detlef!

I would also like to point out that he'll be …

[Read more]
Showing entries 28983 to 28992 of 44105
« 10 Newer Entries | 10 Older Entries »