Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Lua Benchmarking

Received: by 10.90.3.37 with SMTP id 37mr861454agc.13.1289539498313;
        Thu, 11 Nov 2010 21:24:58 -0800 (PST)
X-BeenThere: redisql-dev@googlegroups.com
Received: by 10.91.207.2 with SMTP id j2ls327285agq.4.p; Thu, 11 Nov 2010
 21:24:57 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.2.37 with SMTP id 37mr172915agb.30.1289539497248; Thu, 11
 Nov 2010 21:24:57 -0800 (PST)
Received: by 29g2000prb.googlegroups.com with HTTP; Thu, 11 Nov 2010 21:24:57
 -0800 (PST)
Date: Thu, 11 Nov 2010 21:24:57 -0800 (PST)
In-Reply-To: <AANLkTimVGB8YBJ_HQSziGyE7GXJvcZKeiGTqJzag2Jf-@mail.gmail.com>
X-IP: 24.7.35.81
References: <157ffce7-5ab6-4924-aa82-e752eb290082@a9g2000pro.googlegroups.com> <AANLkTimVGB8YBJ_HQSziGyE7GXJvcZKeiGTqJzag2Jf-@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us)
 AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8,gzip(gfe)
Message-ID: <fd1a2631-9ad8-4f0b-bdd7-b7bdc2672185@29g2000prb.googlegroups.com>
Subject: Re: Lua Benchmarking
From: Jak Sprats <jakspr...@gmail.com>
To: redisql-dev <redisql-dev@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi David,

Good points and your ideas are totally in line w/ Redisql's goals.

Redisql builds indices pretty quickly ... 18 seconds to build an index
on a 10million row table.
This would effectively block the Database for 18 seconds, but its not
often you need a 10million row table index addition.
1 million rows took 1.5 secs. 2million rows took 3.3 secs. 5 million
rows took 8.9 secs.

Traditional databases are slow at building indexes because they have
locks, Redisql does not.

Oracle does Alter Table correctly, Mysql does not. Doing it correctly
is non-trivial.

I have not yet implemented "ALTER TABLE" but I have designed several
fields so that Alter table will set some flags and actually do the
adding or deleting of columns the next time the row is accessed by
another command (and possibly also in a server-cron when the server is
idle). This is more complex, but it avoids the terribleness that all
Mysql DBAs associate w/ the "ALTER TABLE" command.

Alter table will be implemented in December at the earliest, it is not
yet a pressing priority.

- Jak

On Nov 11, 7:33=A0pm, David Yu <david.yu....@gmail.com> wrote:
> On Fri, Nov 12, 2010 at 9:40 AM, Jak Sprats <jakspr...@gmail.com> wrote:
> > Hi All,
>
> > I added Lua benchmarking today, here is a gist w/ the results
> >https://gist.github.com/673570
>
> > The idea was to see
> > 1.) the overhead that calling routines in Lua has
> > 2.) if nested Lua calls were linearly more costly
>
> > 1M requests on a 3.0GHz CPU
> > ----------------------------------------------------------
> > SET 89783.27 requests per second
> > GET 92997.39 requests per second
> > LUA(set) 50913.95 requests per second
> > LUA(get) =A055218.44 requests per second
> > LUA(set_session) 25155.99 requests per second
> > LUA(get_session) 42436.16 requests per second
>
> > set_session and get_session are nested routines. set_session does 4
> > seperate SETs and get_session does 2 GETs (plus some logic).
>
> > Lua Overhead: 42%
> > Nesting costs: better than linear
> > =A0 =A0 =A0 (linear =3D=3D =A04-to-1 and 2-to-1)
> > =A0 =A0 =A0 (results are 2-to-1 and 1.3-to-1)
>
> > The value of embedding Lua, in this example, is in get_session,
> > instead of making sequential calls from a web-server to Redisql (which
> > takes forever in relative terms [6-8 OrderOfMagnitude longer]), the
> > web-server<->Redisql is a single request w/ sequential logic done
> > datastore side.
>
> > If you can push logic into the Datastore you can cut latency down to
> > nothing :)
>
> Stored procedures :-)
>
> Off topic question:
> In traditional rdbms, its hard to do online schema change(alter table,
> creating an index ... typically doing them on the replica and then switch
> over)
> With rediSQL, is this possible to do without involving a slave and still =
be
> fast to make the change?
> Its a good goal to have since its basically enables rediSQL to be an rdbm=
s
> with schemaless nosql agility.
>
>
>
> > - Jak
>
> --
> When the cat is away, the mouse is alone.