Blog Archives

#CryptDB : HOWTO Compile on Ubuntu Linux [UPDATE 2]

First, what is CryptDB.
A SHORT PRESENTATION, very useful to understand how it works.

Second, reference system: Ubuntu Linux LTS 12.04.x 32bit 64bit (see this comment).

Third, [NEW] installation:

sudo apt-get udate
sudo apt-get install git ruby
git clone -b public git://g.csail.mit.edu/cryptdb
cd cryptdb
sudo ./scripts/install.rb .

Done. It’s that simple now 😎
If it fails to compile, see THIS comment.

If you still do not succeed see THIS comment.

With recent version of Ubuntu (14.04 and 16.04) you might need to downgrade Bison, see THIS comment.

[OLD] installation:

  • install needed packages:
    sudo apt-get install automake bison bzr cmake flex g++ git gtk-doc-tools libaio-dev libbsd-dev libevent-dev libglib2.0-dev libgmp-dev liblua5.1-0-dev libmysqlclient-dev libncurses5-dev libntl-dev libssl-dev
  • create a directory, then download software to compile:
    mkdir $HOME/cryptdb-inst
    cd $HOME/cryptdb-inst
    git clone -b public git://g.csail.mit.edu/cryptdb
    wget http://es.csail.mit.edu/mysql-5.5.14.tar.gz
    bzr branch lp:mysql-proxy
  • compile mysql-proxy:
    cd mysql-proxy
    sh ./autogen.sh
    ./configure --enable-maintainer-mode --with-lua=lua5.1
    make
    sudo make install
  • build CryptDB on MySQL:
    cd $HOME/cryptdb-inst
    tar xzf mysql-5.5.14.tar.gz
    cp -R cryptdb/parser/mysql_mods/* mysql-5.5.14/
    rm mysql-5.5.14/sql/sql_yacc.{cc,h}
    cd mysql-5.5.14
    mkdir build
    cd build
    cmake -DWITH_EMBEDDED_SERVER=ON ..
    make
    sudo make install
    cd /usr/local/mysql
    sudo chown -R mysql .
    sudo cp support-files/my-medium.cnf /etc/my.cnf
    sudo scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/
    sudo /usr/local/mysql/bin/mysqld_safe --lc-messages-dir="/usr/local/mysql/share/english/"
    /usr/local/mysql/bin/mysqladmin -u root password 'letmein'
  • Build CryptDB:
    cd $HOME/cryptdb-inst/cryptdb
    cp conf/config.mk.sample conf/config.mk
    sed -i'' -e"1s%/home/nickolai/build%$HOME/cryptdb-inst%" conf/config.mk
    make
    sudo make install
  • now, it’s time to read cryptdb/doc/README, enjoy! 😉

NOTE1: you should create a user mysql to run DBMS for security reasons:
sudo groupadd mysql
sudo useradd -r -g mysql mysql

NOTE2: be very careful on each step and you wont fail.

Advertisement

#MacOsX : VMware Fusion 5 vs. VMware Fusion 6 vs. VMware Fusion 7 vs. Parallels Desktop 7 [UPDATED]

I will not present functionalities here; it will be just a really brief benchmark.

Configuration:

  • Hard Disk OCZ-AGILITY3 240 GB, firmware 1.15
  • Graphics  NVIDIA GeForce 9400M 256 MB
  • Memory  8 GB 1333 MHz DDR3
  • Processor  2.26 GHz Intel Core 2 Duo
  • MacBook Pro 13-inch, mid 2009
  • Software
    • Hosts: Mac OS X Lion 10.7.4 (Parallels 7, Fusion 5), Mac OS X Mavericks 10.9.4 (Fusion 5, Fusion 6), Mac OS X Yosemite 10.10.4 (Fusion 6, Fusion 7)
    • Guest: Windows 7

Some info:

  • VMs have 2,5 GB RAM allocated
  • VMs have 1 CPU allocated
  • Parallels was tested when disk was new, while Fusion with half of the space occupied
  • Parallels VM has optimize Windows performance on
  • Fusion VM has disk buffering disabled
  • Fusion 5.0.5, Fusion 6.0.4, and Fusion 7.1.2 were tested with Windows Aero OFF
Component Parallels 7.15106 Fusion 5.0.[1-3] Fusion 5.0.5 Fusion 6.0.4 Fusion 7.1.2
Processor: 4.4 4.4 4.4 4.4 4.4
Memory (RAM): 5.5 5.5 5.5 5.5 5.5
Graphics: 5.0 5.0 5.9 5.9 4.7
Gaming graphics: 4.4 4.2 5.1 5.2 4.2
Primary hard disk: 7.2 7.7 7.4 7.4 7.4

NOTE1: Fusion 5 seems to start and stop a bit slower than Parallels 7. Fusion 6 doesn’t improve, but SSD might be slower after this time than it was originally.

NOTE2: disabling Aero drastically improve Graphics performance, so do it!

NOTE3: Fusion 6 improve 3D Graphics performance over Fusion 5, but just slightly, so it is not worth an update. IMHO.

NOTE4: the combination of Mac OS X Yosemite and Fusion 7 has poor graphics performance. It is actually a big regression. I think Apple is to blame here.

%d bloggers like this: