Pencarian

Rss Posts

 

 

 

Berita pada kategori ‘F/OSS’

MariaDB 5.3.4 benchmarks

Feb 19, 2012

MariaDB 5.3 has reached the release candidate milestone, and the 5.3 version promises a lot of new features and optimization (i.e in optimizer http://kb.askmonty.org/en/what-is-mariadb-53#query-optimizer). No surprise I wanted to check how all improvements affect general performance.
So I why don’t we run old good sysbench benchmark.

For the benchmark I took:

HP ProLiant DL380 G6 box
sysbench multitables oltp rw workload, 16 tables, 500mil rows each, total datasize about 30GB
working threads from 1 to 256
Versions: MariaDB 5.3.4, MySQL 5.5.20
Data is stored on RAID10 HDD partition
Like in all my recent benchmarks, I make throughput measurements each 10 sec, so we can see the stability of the throughout

The raw results, configuration and scripts are available on our Benchmarks Launchpad
The graphical results:
Throughput (more is better)

Threads MariaDB 5.3.4 MySQL 5.5.20 Ratio
1 252 271 0.9298893
2 412 588 0.7006803
4 801 1097 0.7301732
8 1709 2205 0.7750567
16 3197 4076 0.7843474
32 3303 4166 0.7928469
64 3336 4150 0.8038554
128 3800 4170 0.9112710
256 3710 4131 0.8980876

I was surprised to see that MariaDB shows 20-30% worse throughput.
It seems many changes resulted to performance hit in general. I wonder whether MariaDB team runs performance regression benchmarks, and if they do, why do we see such performance decline.
Follow @VadimTk

MariaDB: the new MySQL? Interview with Michael Monty Widenius.

Sep 29, 2011

?I want to ensure that the MySQL code base (under the name of MariaDB) will survive as open source, in spite of what Oracle may do.? — Michael ?Monty? Widenius. Michael ?Monty? Widenius is the main author of the original version of the open-source MySQL database and a founding member of the MySQL AB company. [...]

Quick introduction to Embeddability of GlassFish Open Source Edition 3.1

Mar 02, 2011

Embeddability of GlassFish is been around for quite some time now. In 3.1, the embeddable APIs have been revised. Most of the GlassFish community is already aware of the API revision, however I would like to briefly describe the revised APIs in this blog and welcome any feedback.

Embeddable API overview:

API JavaDocs are at http://embedded-glassfish.java.net/nonav/apidocs/

The APIs are briefly categorized as :

(a) Top level APIs (org.glassfish.embeddable) : Provides classes and interfaces necessary to embed GlassFish and perform lifecycle operations, application deployments and runtime configurations

(b) Scattered Archive APIs (org.glassfish.embeddable.archive) : Abstraction for a scattered Java EE archive (parts disseminated in various directories).

(c) Web Container APIs  (org.glassfish.embebdable.web, org.glassfish.embeddable.web.config) : Provides classes and interfaces necessary to programmatically configure embedded WebContainer and create contexts, virtual servers, and web listeners.

(d) Advanced pluggability (org.glassfish.embeddable.spi) : Provides classes and interfaces necessary to plugin a custom GlassFish runtime.

(e) EJB container APIs (javax.ejb.embeddable) : Refer "Embedded Server Guide" for EJB embeddable APIs

Basic examples of embedding GlassFish and deploying applications to embedded GlassFish:

These examples are can be run with either of the following jars in your CLASSPATH:

Full profile uber jar : http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-embedded-all/3.1/glassfish-embedded-all-3.1.jar
Web profile uber jar: http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-embedded-web/3.1/glassfish-embedded-web-3.1.jar
Installed GlassFish’s shell jar : $GF_INSTALLATION/lib/embedded/glassfish-embedded-static-shell.jar

Once you have ANY ONE of the above jar file with you, GlassFish can be embedded in your application by simply doing:

import org.glassfish.embeddable.*;

/** Create and start GlassFish */
GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish();glassfish.start();

Let us say that you would like 8080 web container port to be started while embedding GlassFish, then you have to do this:

import org.glassfish.embeddable.*;

/** Create and start GlassFish which listens at 8080 http port */
GlassFishProperties gfProps = new GlassFishProperties();
gfProps.setPort("http-listener", 8080); // refer JavaDocs for the details of this API.

GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(gfProps);glassfish.start();

Or let us say that you have 3.1 installation and want to embed GlassFish domain1 in your application, then you can do:

import org.glassfish.embeddable.*;

/** Bootstrap the GlassFish runtime pointing to 3.1 installation */BootstrapProperties bsProps = new BootstrapProperties();bsProps.setInstallRoot(System.getEnv("GF_INSTALLATION"));GlassFishRuntime gfRuntime = GlassFishRuntime.bootstrap(bsProps);

/** Point GlassFish to domain1 */
GlassFishProperties gfProps = new GlassFishProperties();
gfProps.setInstanceRoot(System.getEnv("GF_INSTALLATION") + "/domains/domain1");
GlassFish glassfish = gfRuntime.newGlassFish(gfProps);

glassfish.start();

Note: If you have a custom domain.xml while embedding GlassFish, then you can use setConfigFileURI(String configFile) API of GlassFishProperties. JavaDoc has all the details.

Once you have the GlassFish embedded and is running, you may like to deploy a pre-built Java EE archive using the code below:

import org.glassfish.embeddable.*;

// Obtain the deployer from the glassfish which is embedded via the piece of code above.Deployer deployer = glassfish.getDeployer();

// syntax of deployment params are same as how they are passed to 'asadmin deploy' command.deployer.deploy(new File("simple.war"), "--contextroot=test", "--name=test", "--force=true");

// if you have no deployment params to pass, then simply do this:deployer.deploy(new File("simple.war")); 

If your archive is not pre-built, instead it’s components are scattered in multiple directories, then you may be interested in using the scattered archive APIs:

import org.glassfish.embeddable.*;import org.glassfish.embeddable.archive.*;

Deployer deployer = glassfish.getDeployer();

// Create a scattered web application.ScatteredArchive archive = new ScatteredArchive("testapp", ScatteredArchive.Type.WAR);// target/classes directory contains my complied servletsarchive.addClassPath(new File("target", "classes"));// resources/sun-web.xml is my WEB-INF/sun-web.xmlarchive.addMetadata(new File("resources", "sun-web.xml"));// resources/MyLogFactory is my META-INF/services/org.apache.commons.logging.LogFactoryarchive.addMetadata(new File("resources", "MyLogFactory"), "META-INF/services/org.apache.commons.logging.LogFactory");

deployer.deploy(archive.toURI())

Similarly, the scattered enterprise application (EAR type) can be deployed like this:

import org.glassfish.embeddable.*;import org.glassfish.embeddable.archive.*;

Deployer deployer = glassfish.getDeployer();

// Create a scattered web application.ScatteredArchive webmodule = new ScatteredArchive("testweb", ScatteredArchive.Type.WAR);// target/classes directory contains my complied servletswebmodule.addClassPath(new File("target", "classes"));// resources/sun-web.xml is my WEB-INF/sun-web.xmlwebmodule.addMetadata(new File("resources", "sun-web.xml"));

// Create a scattered enterprise archive.ScatteredEnterpriseArchive archive = new ScatteredEnterpriseArchive("testapp");// src/application.xml is my META-INF/application.xmlarchive.addMetadata(new File("src", "application.xml"));// Add scattered web module to the scattered enterprise archive.// src/application.xml references Web module as "scattered.war". Hence specify the name while adding the archive.archive.addArchive(webmodule.toURI(), "scattered.war");// lib/mylibrary.jar is a library JAR file.archive.addArchive(new File("lib", "mylibrary.jar"));// target/ejbclasses contain my compiled EJB module.// src/application.xml references EJB module as "ejb.jar". Hence specify the name while adding the archive.archive.addArchive(new File("target", "ejbclasses"), "ejb.jar");

deployer.deploy(archive.toURI())

Finally, towards the end of your application, you would like to stop/dispose your embedded GlassFish:

import org.glassfish.embeddable.*;

/** Stop GlassFish */
glassfish.stop(); // you can start it again.

/** Dispose GlassFish */glassfish.dispose(); // you can not start it again. But you can embed a fresh glassfish with GlassFishRuntime.bootstrap().newGlassFish()

More Examples:

If you checkout https://svn.java.net/svn/glassfish~svn/trunk/v3/tests/embedded you will find many more examples which cover embeddable web container APIs also.

Feedback:

If you have any feebback on the APIs, please send them to dev@glassfish.java.net or dev@embedded-glassfish.java.net

MySQL 5.5.9

Feb 11, 2011

You blink and there is a new version. I have not seen an Planet MySQL release as yet about this new version. Release Notes.
I’d like to say I installed it, but I downloaded the Linux – Generic 2.6 (x86, 64-bit), TAR file, only to find it contains 6 rpm files. #fail, I’m using Ubuntu.
You have to scroll to the bottom of the list (another stupid thing for a generic binary choice) to get Linux – Generic 2.6 (x86, 64-bit), Compressed TAR Archive. Double #fail

Hendy Irawan: Activating the EMF Edit ItemProvider AdapterFactory-s (with CDO)

Dec 30, 2010

I used to have a problem with CDO Editor UI: it does not use my EMF Edit models’ ItemProvider implementation (like label formatting, image/icon, and so on).

Today I found the reason, I changed the model’s nsURI and did not change all references to it.

The relevant portion is plugin.xml for your.model.edit plugin :

?? <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
????? <factory
??????????? uri="
http://www.abispulsa.com/model/1.0"
??????????? class="com.abispulsa.provider.AbispulsaItemProviderAdapterFactory"
??????????? supportedTypes=
????????????? "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
?????????????? org.eclipse.emf.edit.provider.IStructuredItemContentProvider
?????????????? org.eclipse.emf.edit.provider.ITreeItemContentProvider
?????????????? org.eclipse.emf.edit.provider.IItemLabelProvider
?????????????? org.eclipse.emf.edit.provider.IItemPropertySource"/>
?? </extension>

The way to get ComposedAdapterFactory I previously blogged turned out to be incorrect:

public class AbispulsaContentProvider extends AdapterFactoryContentProvider {

private static AdapterFactory adapterFactory;

static {
adapterFactory = new ComposedAdapterFactory(new AdapterFactory[] {
new ResourceItemProviderAdapterFactory(),
new AbispulsaItemProviderAdapterFactory(),
new ReflectiveItemProviderAdapterFactory()
});
}

public AbispulsaContentProvider() {
super(adapterFactory);
}

}

The correct way is like this:

public class AbispulsaContentProvider extends AdapterFactoryContentProvider {

private static ComposedAdapterFactory adapterFactory;

static {
Registry registry = EMFEditPlugin.getComposedAdapterFactoryDescriptorRegistry();
adapterFactory = new ComposedAdapterFactory(registry);
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
}

public AbispulsaContentProvider() {
super(adapterFactory);
}

}

Although then you should move the ComposedAdapterFactory creation to another singleton class so it can be reused from both ContentProvider and LabelProvider.

Note that for above to work, the extension org.eclipse.emf.edit.itemProviderAdapterFactories must also be set properly.

This is actually not CDO specific, but applies to all EMF Edit / Editor UI in general.
But it highlights a very important CDO feature: it reuses your EMF Edit ItemProvider implementations! :-)

Proposal for MariaDB trademark policy

Dec 21, 2010

Within Monty Program Ab we have during this year had a lot of discussions about how to go forward with the MariaDB trademark. It’s been clear that everyone wants to have something that is substantially freer than the MySQL trademark to ensure the survival of MariaDB whatever happens to Monty Program Ab.We wanted to make something that should work well, both for open source and commercial usage (and yes, I know that in some cases these are one and the same), which is not very common with many other trademark policies. My belief is that by having a very liberal trademark policy we will create a bigger ecosystem around MariaDB which will help all of us.Now we have had a couple of internal drafts (with heavy input from our community advocates) and we have released our first public draft.Please give us feedback about this either on my blog or the knowledge base so that we can take your thoughts into account for our final version!

Bob Balfe: Google contributes GUI designer tool to Eclipse!

Dec 15, 2010

Wow, perfect timing for our Lotusphere presentation. You can download the tool right from Google or you can read about the functionality it brings.

Tools being donated include the WindowBuilder Java UI design tool as well as CodePro Profiler, a runtime Java analysis gauging factors like memory leaks. Both tools became Google property when the company bought Instantiations in August; they will now become open source projects at Eclipse. WindowBuilder has been used for development related to Standard Widget Toolkit, GWT (Google Web Toolkit), and Swing.

Check out the full article on InfoWorld.

People not liking open source (and it’s not Oracle)

Nov 07, 2010

I’ve already dealt with this argument so far… but it’s really so crazy that I can’t prevent myself from blogging again on it, also taking advantage of this article by ACM titled “Should code be Released”. The subcaption says it all “Software code can provide important insights into the results of research, but it’s up to individual scientists whether their code is released – any many opt not to..

So, some scientists still refuse to publish the code that helped them in achieving a certain theory. While I’m certainly not so naive to assert that they should publish to SourceForge since their first commit, once one has published his research to a couple of relevant places, and has bound his name to that research, arguing that releasing the code could help others to “steal” is really hilarious. On the contrary, we all know how big a difference in quality the open source approach can deliver. Science is based on peer review: how the hell can be that a theory is peer reviewed if you can’t reproduce the steps to get to the underlying model? While in our community we are only poor technologists and not scientists, everybody would scream in disgust if I only dared to assert “I have demonstrated that Java is 5x faster than C”, but I don’t release the benchmark code so everybody can try it.

 I can only conclude that many scientists are not confident at all with their theories, or they are purportedly cheating.

Doug Schaefer: Historic Day for Linux Desktop?

Nov 05, 2010

I just tweeted this, but it’s worthy of a blog entry because I think this will, or at least should be, marked as an historic day for Linux. Mark Shuttleworth, Ubuntu chief, blogged yesterday that they are starting a transition from an X Windows based environment to the Wayland display server. That is huge news and a huge push for the fledgling Wayland project which is starting to get a lot of love lately. Intel, who employs the main developer for Wayland, already seems committed to getting MeeGo on top of it, but this move for Ubuntu all but assures Wayland will become mainstream for the Linux desktop. And I can’t wait for that!

So what the heck is Wayland and why am I so excited about it? Well I’ve been working with X Windows since my university days when X11 was spanking new. It had a great architecture that allowed the display to be hosted on a different machine than where the application ran. Back in the early 90’s that was pretty important since workstations weren’t very powerful so we still had big iron Unix servers where we ran things and being able to display them on any machine in the lab was liberating. It was the best, back in the early 90’s that is.

Then entered personal computers thanks to Microsoft Windows and to some extent Apple Macintosh. As these machines grew faster and faster, it became more economical to run your applications locally. Not only that, but the graphic architecture, where display handling was part of the operating system, allowed for the desktop environments to become rich, to the point now where we have the beautiful environments of Windows 7 and Mac OS X.

Now when Linux came along, the powers that be chose X Windows as the underlying display architecture. It made sense since X Windows is open source and it does a good job. But it is shackled by the underlying architecture that made it popular in the 90’s. As Mark put it, “I understand that it?s *possible* to get amazing results with X, but it?s extremely hard, and isn?t going to get easier. Some of the core goals of X make it harder to achieve these user experiences on X than on native GL, we?re choosing to prioritize the quality of experience over those original values, like network transparency.”

And that’s where Wayland comes it. Wikipedia describes it as “a lightweight display server for the Linux desktop. Started by Kristian H?gsberg, one of Intel OSTC member, the software’s stated goal is ‘every frame is perfect, by which I mean that applications will be able to control the rendering enough that we’ll never see tearing, lag, redrawing or flicker’”. It gives the application and window managers full control over how their content is displayed and gives them free access to the graphic hardware acceleration through OpenGL and OpenGL ES, essentially the same architecture which gives Windows and Mac their great environments.

It’s going to take some time as the ecosystem grabs hold of the possibilities. It is almost certain that other Linux distributions will jump on the bandwagon, and I’m sure nVidia and AMD will do the same with their hardware drivers. But once they do, I am convinced that this will finally make Linux a real contender in the desktop space. I can’t wait :) .

Can Java as we know survive in Oracles eco system?

Nov 03, 2010

Many people were concerned when Oracle acquired Java.

The concern seems warranted in light of lawsuits, Gosling & Lea leaving important positions, Apple dropping support, the death of JCP, and Oracle no longer providing TCK for Apache going forward.

Unlike IBM, Sun, and others, I have never used any open source of free products produced by Oracle.  (I’ve tested numerous Oracle products like JDeveloper, but everything I touched fell way short of expectations)

The conflict steams from the core of Oracle existences.

Oracle makes their money from selling the corporate manager, not a software developer that actually has to write code every day.

It is apparent with recent revelations that Oracle’s corporate approach in impacting Java, and is the mindset is having a negative impact on Java.

During the War Between the States, generals applied old style Napoleonic war techniques with modern weapons.  The results of applying the Napoleonic system were disastrous. 

Oracle shouldn’t think that the same internal processes that made RDBMS a success can simply be applied to Java.   

For Java to continue thrive and grow, Oracle needs for realize the impact, develop an internal eco system separate than the present approach, and fix some burnt bridges. 

Gosling thinks Java has too much momentum for Oracle to do real harm.  Give Oracle a chance, Gosling may be surprised how much damage Oracle can cause Java.