[Mifos-developer] In-memory DB for faster tests?

22 views
Skip to first unread message

Michael Vorburger

unread,
Oct 4, 2010, 12:35:19 PM10/4/10
to Developer
An mvn clean install (with tests) on application take between 25-35 minutes, does that sound about right?

Must of it seems to be in the DB - correct? Would some kind of in-memory DB helper for much faster application integration, and acceptance, tests?

Adam/Udai I found your thread http://groups.google.com/group/mifosdeveloper/browse_thread/thread/ab164f0560cba5a3?pli=1 - are you actively using this still? Works well? It's a little cumbersome to set-up... ;) just ranting. Worth a Wiki page?

Also, a colleague at work pointed me to http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html, did any of you ever try that? Seems somewhat easier to set-up (although... must ENGINE = MEMORY after CREATE TABLE would have to be in the DDL, but we could have some token that we replace?), and may be even faster (one would assume that a Storage Engine designed to be without I/O is much more optimized than a 'normal' disk-based I/O storage engine hitting a RAM disk) ? It seems to have a few limitations (no BLOG & TEXT??), would that be a problem for the MIFOS Schema?

Thoughts / feedback?

_______________________
Michael Vorburger
http://www.vorburger.ch

Udai Gupta

unread,
Oct 4, 2010, 12:47:16 PM10/4/10
to Mifos software development
Hi Michael,

Yes, I am using the in-memory mysql with that cumbersome setup.

I thought about MEMORY engine but the differences are too large to
consider it as alternate for INNODB in memory.

http://dev.mysql.com/tech-resources/articles/storage-engine/part_3.html

Udai

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d

kgam...@gmail.com

unread,
Oct 4, 2010, 2:11:01 PM10/4/10
to Mifos software development
Hello Michael,
I am using tmpfs on ubuntu linux but the setup is quite simple. I setup
a tmpfs partition and then modify the my.cnf to point to that directory
(datadir option).

Additionally, I have a folder for persisting the tmpfs partition. That
way I don't have to recreate the mifos databases each time. I also use a
script to do the setup.

#!/bin/bash

umount tmpfs
mount -t tmpfs -o size=400M tmpfs /opt/ram

MYSQL_DATA="/opt/ram/mysqldata"
RAM_PERSISTENCE="/opt/ram_persistence/mysqldata"

mkdir -p $MYSQL_DATA
cp $RAM_PERSISTENCE/* $MYSQL_DATA -R

chown mysql /opt/ram -R

service mysql stop
service mysql start
exit 0

#end of script

The only problem I have with this setup is that if I have to use another
application that requires mysql, I have to change datadir and restart
mysql. An alternative will be to setup two mysql instances on different
ports.

Regards,
Kojo

Adam Monsen

unread,
Oct 4, 2010, 6:45:07 PM10/4/10
to Mifos Developer Discussions
On Mon, 2010-10-04 at 18:35 +0200, Michael Vorburger wrote:
> Would some kind of in-memory DB helper for much faster application
> integration, and acceptance, tests?

I think the ram-backed MySQL solution Udai, Hatim and I discussed (and
use) is a good-enough bridge solution until we get to--IMHO--the *real*
solution of better code and less and better-written functional
(integration and acceptance) tests.

> Adam/Udai I found your thread ... are you actively using this still?


> Works well? It's a little cumbersome to set-up... ;)

Yes, yes, yes.

> just ranting. Worth a Wiki page?

Yes, please! Stop ranting and make that page already. :D

Generally my builds were in the 13-15 minute range, but the last one I
ran actually took 22 minutes--I'm not sure why.

signature.asc

Michael Vorburger

unread,
Oct 6, 2010, 6:11:56 PM10/6/10
to Mifos software development
Reply all
Reply to author
Forward
0 new messages