Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ??

share|improve this question

2 Answers 2

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

share|improve this answer
    
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 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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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