Archive for March, 2007

Optimize MySQL for Low Memory Use

MySQL is a light database engine compared tomany of it’s rivals, but for some reason theDebian MySQL-server package contains a setup that makes it very heavy and memory consuming. The Debian version of becomes memory consuming because it comes with config file where MySQL’s most memory consuming and seldom used storage engine InnoDB is enable. As result of this the MySQL server instance uses around 100MB of memory while almost idle.

And here comes the optimization tip.

Since the InnoDB storage engine is used very seldom it can be disable in most cases and let the server save almost about 100MB of memory.

To disable to InnoDB storage engine add this to my.cnf (the default MySQLconfiguration files) in /etc/mysql/

More on MySQL and Apache optimization and here

Comments off

Syntax Highlight Code in WordPress Posts

From time to time I post code snippets in blog posts. Today I found a wordpress plugin, Code Snippet 2.0, a plugin that eases code posting by escaping the the code right. And moreover Code Snippet 2.0 displays the code with highlighting. The plugin uses GeSHi syntax highlighter engine – a flexible and easy extendable highlighter engine.


  • Download the plugin here
  • Copy archive to wp-content/plugins directory
  • Extract the zip file
  • When extracted properly you should have a directory structure like: /wp-content/plugins/codesnippet
  • Enable the Plugin in WP-admin


<code lang="php">
< ?php
echo "Hello World";


< ?php
echo "Hello World";

The list of supported languages in Code Snippet 2.0:

  • actionscript-french
  • actionscript
  • ada
  • apache
  • applescript
  • asm
  • asp
  • bash
  • caddcl
  • cadlisp
  • c_mac
  • c
  • cpp
  • csharp
  • css-gen
  • css
  • delphi
  • diff
  • div
  • dos
  • d
  • eiffel
  • freebasic
  • gml
  • html4strict
  • ini
  • inno
  • java
  • javascript
  • lisp
  • lua
  • matlab
  • mpasm
  • nsis
  • objc
  • oobas
  • oracle8
  • pascal
  • perl
  • php-brief
  • php
  • python
  • qbasic
  • sdlbasic
  • smarty
  • sql
  • vbnet
  • vb
  • vhdl
  • visualfoxpro
  • xml

Comments off