Tuesday, 3 February 2015

Software longevity: Memory & Hard Disk

If you ask me what are the main factors which don't let even carefully designed, developed and even tested software continue working in long run, I'd say "Memory & Disk". These two factors always get underestimated by programmers or get no attention at all. Remember from the previous post the reason of NASA's Spirit rover problem was a disk full.

Why do we always assume we have the required amount of memory and disk space all the time? Why our tests don't show these problems? There are many reasons let me bring some of them here:
1- Wrong kind of tests: We usually don't test developed software in long term or don't put them under test for weeks or months. This mostly happens when you are new in software testing and don't have enough experience, and you get excited when it works for weeks, this doesn't mean your software doesn't have memory leak or doesn't waste disk space.
2- Don't have enough time: Even if we test the software in months we usually can't test it in years, which many software systems should work in years without restarting. This one happens when you are under pressure to deliver the software as soon as possible. 
3- Fear of failure: We get emotionally involved in software development and the developed software itself. This one has good and bad sides, one of the bad sides is that we always have some fear of failure when we try to test the software, so we usually test it gently and as we see some signs of acceptance we finish the test.  
4- Not in a real environment: If you think the user puts a dedicated hardware for your software and gives your software enough memory and disk space, you are wrong. They may do this at first but sooner or later they will install other software systems on the machine. Even if we test the software in months and apply any kind of test procedure to it, we usually forget that this is not the real environment the software is going to work.



What is the problem with Memory and Disk?
These are two important shared resources which almost any software needs them to work and be useful, so you may easily get out of memory or disk space if either your software eats memory or produces files or disk data or any other software does these or limits your access to these resources.

How can we prevent the problem?
There is no doubt that the first thing you need to do is to test the system as much as and as long as possible. Use anything or method you know to make sure your software don't leak memory and was disk space.

Another important thing is giving some feedback to the user. I wonder why even a software which has been in the market for decades still don't do this, they get slow, start malfunctioning and don't say anything about why they are working like this. It is not difficult to check the minimum required Disk and Memory space once in a while and report it to the user, especially when they are dramatically reaching to their thresholds. 

No comments:

Post a Comment