I've developed a tiny webserver for home automation out of an ALIX 1D, and based on a debian lenny. It runs very smoothly and is now able to operate quite a lot of different equipment from a webapp.

But i'm not sure how I should handle the compact flash, regarding read/write limitations.

From what I've read the partitioning should be ext2, which would disallow the journalisation of the system.

A utility to 'flatten' the repartition of write cycles exists, would it be relevant to use if the partition is ext2 ?

I will also disable all logging in execution mode (a debug mode will provide the logs). Is there any other parameters I have to take into account for maximum reliability (i.e. does the system randomly write in some files for various and potentially turned off purposes)?

As for the mysql database, it's not important data, and it's actually reconstructed every time the server boots. Given this, is there a way to store the db in RAM rather than in a file ?

I'm not sure it's the right place to ask, but I sometimes see redirection to here from stack overflow.

Thanks for having read. PS : How come it seems impossible to add basic politeness at the very top of the message ??


Using the MEMORY storage engine for a table will hold it in memory.

  • memory storage engine is only fixed row. If you want to be able to put 64k text field every row will take 64k even if it's 2 bytes. Most of the time you have at least few tables that need to have big fields and are not good for memory storage – NickSoft Feb 9 '14 at 16:18

MEMORY storage engine is a good idea but it has some limitations which MyISAM/InnoDB won't have. If this is no good you can always mount the mysql datadirectory from tmpfs. All you need to take care is to extract the mysql tables from a backup after mounting the tmpfs. E.g. ( assume mysql data /var/lib/mysql)

  • shutdown mysql
  • if you don't already have make a tar of the mysql data dir, e.g. cd tar -C /var/lib/mysql -czvf /tmp/mysql-data.tar .
  • mount -t tmpfs none /var/lib/mysql
  • unpack data : tar -C /var/lib/mysql -xvzf /tmp/mysql-data.tar
  • restart mysql

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.