22 05, 2013

innodb_file_per_table for existing MySQL database

By |2013-05-22T13:48:55+00:00May 22nd, 2013|Uncategorized|1 Comment

So you want to toggle innodb_file_per_table on for your existing MySQL database? This is a step by step guide explaining how to do just that. Should I really enable innodb_file_per_table? Some people prefer it on: I do http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/ http://code.openark.org/blog/mysql/reasons-to-use-innodb_file_per_table https://tools.percona.com/wizard Some people prefer it off: http://umangg.blogspot.se/2010/02/innodbfilepertable.html Other Articles Other people have already written articles on the subject. I would suggest reading those as well to get other points of view: http://www.datavail.com/about-datavail/blog/50-mysql/451-innodb-conversion-to-file-per-table http://dba.stackexchange.com/questions/11043/mysql-changing-innodb-file-per-table-for-a-live-db http://serverfault.com/questions/230551/mysql-innodb-innodb-file-per-table-cons http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine/4056261#4056261 After [...]

22 05, 2013

Convert MyISAM tables to InnoDB

By |2013-05-22T13:16:25+00:00May 22nd, 2013|Uncategorized|0 Comments

Did you know that InnoDB replaces MyISAM as the default storage engine since MySQL 5.5.5? For this reason you may want to convert most (if not all) of your current MyISAM tables to InnoDB. Wordpress does for example make use of the default storage engine. That means old Wordpress installations will make use of MyISAM if you don't update them to use InnoDB instead. SQL to get the job done This is the SQL to [...]

17 07, 2012

Backups for your linux server

By |2012-07-17T23:45:14+00:00July 17th, 2012|Uncategorized|1 Comment

In this guide I describe how to setup backups for your Linux server. We will backup both locally and remotely for extra security. We will backup... MySQL-databases using automysqlbackup. Normal files using rdiff-backup. Special large folders per weekday using rsync. To a remote server using rsync. Setting up the folder structure We start out with creating a folder structure like this: [crayon-5dd599ce6128a529559413/] The new root-level folder "backup" is the storage location we will use for [...]

16 07, 2012

Adding a new storage-device

By |2017-10-12T10:28:22+00:00July 16th, 2012|Uncategorized|0 Comments

This guide covers how to add a new storage device (such as a platter or a solid state drive) to your Linux machine. All work is done from the command-line. Selecting the right storage device This guide does not cover selecting the right model or kind of storage device. Plugging the device into the computer This guide does not cover how to plug the device into the computer. What's the device name? Now that the [...]

26 04, 2012

Bukkit read timed out

By |2017-10-11T13:24:56+00:00April 26th, 2012|Uncategorized|2 Comments

Are you perhaps familiar with the two phrases: read timed out connection reset Since recently I have become quiet familiar with them myself and in this post I will describe how to get rid of them. Reason 1 - Rouge plugin Reason Description Minecraft is mainly single-threaded. The main thread has a formal name when you look in the source code. It is called "Server thread". If a plugin isn't coded correctly the "Server thread" [...]

8 10, 2011

Searching for bukkit memory leaks

By |2011-10-08T15:01:39+00:00October 8th, 2011|Uncategorized|3 Comments

In this post I will describe how to search for memory leaks in your bukkit minecraft SMP server. Getting a heap dump The first step is to obtain a java heap dump to inspect. This is a nice article on the subject: http://blog.emptyway.com/2007/04/02/finding-memory-leaks-in-java-apps/ That article describes some different ways to obtain a heap dump. If you are using a JDK version of java instead of an JRE, you have some neat tools at your disposal [...]

1 10, 2011

Persistent ramdisk with tmpfs and rsync

By |2012-10-21T08:15:22+00:00October 1st, 2011|Uncategorized|4 Comments

Minecraft reads and writes a lot from disk. In order to speed this up we can store the files in memory instead. If you google "minecraft tmpfs" you will find a lot of info on this. The main issue is that ramdisks created using tmpfs are temporary. The content is wiped on a system reboot. The script I created takes care of persisting the ramdisk. It is a general solution that can be used for [...]

27 06, 2011

Quick link to edit the hosts file on windows 7

By |2011-06-27T11:22:14+00:00June 27th, 2011|Uncategorized|0 Comments

If you edit your hosts-file often it can be practical to have a shortcut that opens the file in a texteditor. This is how you would create such a shortcut on windows 7: Create a normal shortcut to the program notetad on your desktop. Edit the target of the link by adding "%SystemRoot%\system32\drivers\etc\hosts" at the end. That way the target of the link will be something like: "%windir%\system32\notepad.exe %SystemRoot%\system32\drivers\etc\hosts". When you use the link you [...]

21 06, 2011

Creating 301 redirects between many pairs of URLs

By |2011-06-21T11:17:01+00:00June 21st, 2011|Uncategorized|0 Comments

I recently upgraded a website. The website consisted of static html documents and some simple php scripts. I transformed it into a wordpress blog. In this process every url was changed. In order to keep the pagerank and not break any inlinks I created 301 redirects between them. If there had been an obvious pattern between the old and new urls this would have been a simple task. For example lets say urls of the [...]

4 04, 2011

Reading browser saved passwords

By |2011-04-04T17:01:00+00:00April 4th, 2011|Uncategorized|0 Comments

Assume you forgot you gmail password but you allowed the browser to remember it for you. You can still log in as the browser fills out the password for you, but you can not find out what the password is as all you see is some stars or dots. The situation is cool for now, as you can log in, but as soon as you clear your browser cache the brower will forget the password [...]