Thursday, March 13, 2014

Hard disk...

Question

I'm about to purchase a SATA hard drive. I was wondering if, aside from the storage capacity, are there any other factors I should keep in mind? I care above all about reliability. Is a more expensive drive less error-prone than a low-end one?

Answer

Consider reading Pinheiro et al (2007) Failure Trends in a Large Disk Drive Population. Proceedings of the 5th USENIX Conference on File and Storage Technologies, Feb 2007. Just search the title on google.

In general, drives of the same manufacturer are made to the same specification in terms of the disk assembly. It is usually the tolerances that differ. To give an example, if you want a paper circle of 5cm diameter, a circle of 4.5 or 5.5 cm maybe acceptable for one use (e.g. home use for decoration of child's room) but a circle of 5.0cm, add or subtract 1mm, (i.e. within 4.9 - 5.1 cm) would be required if it is a decoration project for a project launch for some big, big company.

For example, the load/unload cycle specification of a home drive may be ~ 300,000 times, the load/unload specification of an enterprise drive would be ~ 600,000 times, doubling the figures. The tighter specification also applies to the drive assembly and the disk manufacturing process - and thus the non-recoverable read error rate would be much smaller for enterprise drives, for example, a typical, current home drive - Caviar Black (from Western Digital) would have a nonrecoverable read error per 10^14 bit read. Compare with a typical harddrive manufactured towards datacenter servers WD RE SAS, which would have a nonrecoverable read error per 10^15 bit read. Whether that 10 times more reliability matters to you, is another matter.

To be honest, how you use the drive, is likely more important than which drive you use. Below is a summary of google's findings:
  • 6-7% of the drives fail within first year of use. Within which, more than half of these failing drive will fail within 6 month. These drives tends to be utilized highly during these periods.
  • Failure of the drive follow a double peak model. The first peak is within 3 months, and the second peak is around 3 years.
  • After the first year, there is in general a 8% failure rate of harddrive annually.
  • The effect of temperature is twofold: [1] The lowest failure rate is seen at disks run around 40 degree C. [2] As the drive ages, the failure rate rises expoentially with temperature at third year. To interpret this statement, running the drive at ~35C would achieve the best compromise of longevity and early failures, and if your harddrive can be replaced every 2 years, running the drives as hot as 45C in general would in fact decrease the failure rate, but past the second year there will be an exponential increase if you run it at 45C.
  • If you use SMART reporting software (a nice one is Crystal Disk Info URL: http://crystalmark.info/software/CrystalDiskInfo/index-e.html ), if you see one scan error, 10% will fail within days, and 30% of the drive will fail within 6 months. Thus, backup and discard the drive accordingly after you see the first one. If you see a reallocation event, 10% will fail within ~4 months. Note, however that only 60% of all harddrive failures would be predicted by SMART system.
MTBF

Mean time between failures is basically not very useful for the typical consumers. The Mean time between failure is usually ideal and theoretical. Let's say we have 500,000 drives with MTBF of 500,000 hours - if you run each and every of them together you will likely to have one of them failing every hour, statistically speaking, if you run them within their specification (temperature, humidity, power supply quality...) With reference to the google study, the realistic useful life of a harddrive would be more like 2 years (in a non-redundant system) or 3 years (in a redundant system) - if you use it 24 hours a day - In a redundant system (e.g. a RAID-[5,6]) you can lose a harddrive without losing data. Particularly, in RAID 6 you can lose a harddrive and still have redundancy during the rebuild process.

Service life

One often see some manufacturer quoting service life such as '5 years' and then offering you a warranty of '3 years'. Translation: "We believe that it should last some 5 years. If it fails within the first three years of use, we'll replace it at our cost, but if you have it failed between 3rd and 5th year, poor you. It certainly won't be the case that we have installed some sort of time bomb to make them unusable by its fifth birthday, but you should get a new harddisk and use instead of this 5-year-old harddrive if your data is any precious."

Saturday, March 8, 2014

Allocation of resources: you can't put all bucks in one bucket.

"Selfishness is the greatest curse of the human race." -- William E. Gladstone, four-time prime minister of the U.K. 
With the great increase in the life expectancy in our population, and the advances in medical technology, we are seeing more and more people becoming chronically debilitated, rather than dying from the outset; and with the advances in pharmaceutical industry, we are more able than ever in prolonging life, as well as improving quality of life in patients who would have otherwise died or suffer an ailment that would be worse than dying.

These wonder drugs, however, do not come without a steep price. The question then, is how much is the society willing to pay for these patients? If there is a cap as to how much we're going to pay, would it be based on a "per capita" basis, "per diagnosis" basis, or "per quality-adjusted life-year gained" basis? What is the price of a quality-adjusted life-year?

Taking the most extreme example, given a dose of loratadine (less than $1 hkd/day), and I can be free of my allergic rhinitis symptoms. This facilitates my performance at work, and I guess perhaps I can proudly say that taxpayers funding me the treatment (in the form of a prescription under HA) is probably fair.

On the other hand, a patient with terminal cancer may have his or her life extended by three months by the use of multiple targeted therapy, which can cost more than $10,000 a month per drug. Is that good use of taxpayer money? I shall leave that to the readers to judge. The question for those who answered "yes" is that, what is the opportunity cost for others in giving this patient his/her much-needed targeted therapy drugs?

I think the current approach of using a drug formulary to limit the spending is probably wise. On a side note, none of the psychiatric drugs used currently are "self-financed items". Many are under "special drug" label, but no, patients do not need to pay using these drugs.

Postscriptum. this is a response to "在香港做人,還是仆街到底比較好", Accessed 8 March 2014, URL:http://dadazim.com/journal/2012/03/pk-in-hks/
                                                                                                           

Psychiatric disorder: Bipolar disorder

I guess a blog named pathological mind would not be complete without a touch on psychiatric disorders, and thus, perhaps the topic for today would be bipolar disorder. I decided not to cover treatment though, for I, admittedly, are not so updated with respect to the advances of treatment in the area.

Abbreviations:
MDD: Major depressive disorder (i.e. depression)

Bipolar disorder (or manic-depressive illness) is often a severe, chronic illness chracterised by periods of depression and elation. Manic and depressed phase are both associated with significant morbidity and mortality. Bipolar disorder is usually divided into two forms, I and II. The diagnosis of bipolar I disorder requires a manic episode.

A manic episode is characterized by seven features, which I remember by the mnemonic "fidgets" -
  1. Flight of ideas (the subject feeling that thoughts are going too fast),
  2. Increased goal-related activity, 
  3. Distractibility, 
  4. Grandiosity (thinking that one is of a great status, etc.)
  5. Excessive pleasurable activity, 
  6. Talkative, 
  7. Sleep disturbance

The individual may also have experienced depressive episode or mixed episodes of manic and depressive symptoms in the past.

The diagnosis of a bipolar II disorder requires at least 2 prior major depressive episode and a hypomanic episode. Once an individual is diagnosed of a bipolar I or bipolar II disorder, the diagnosis during subsequent mood episodes continues to be bipolar disorder, with the most recent episode being described as depressed, hypomanic or manic.

Clinical features

Patients with bipolar disorders common experience several major depressive episode prior to their first manic or hypomanic episode. Early in the illness episodes of depression or mania are separated by relatively long periods of normal behavior, but without treatment subsequent episodes become increasingly frequent.

Untreated manic or depressive episodes typically last several months. Treatment results in shortening in length and decrease in severity.

Rapid cycling form of bipolar disorder affects 10-15% of the patients and is characterized by increased frequency of episodes to 2-4 times per year. This form is associated with a poor prognosis and is less responsive to treatment.

Psychotic symptoms may develop during any manic episode, but once present subsequent manic episodes are more likely to be accompanied by psychotic features. Approximately 20-30% of patients with bipolar disorder, and 15-20% of patients with bipolar II disorder (patients who experience hypomanic episodes with depressive episodes) do not experience total recovery between episodes.

Prevalence and heritability

The prevalence of bipolar disorderis about 1.5% and 3% of the general populaton. The lifetime prevalence is approximately 0.8% for bipolar I disorder, 0.5% for bipolar II disorder. The prevalence of these disorders are the same for male and female. 

Bipolar disorders cluster in families. For bipolar I disorder, the risk among first degree relative is 6-7% for bipolar I disorder, 2-5% for bipolar II disorder and 25-35% for MDD. Concordance rate for the monozygotic twins is 75% for bipolar disorder and 50% for major depressive disorder, suggestive of nonheritable as well as heritable factors in disease expression.

In contrast, first degree relatives of patients suffering from bipolar II disorder is at significantly increased risk of developing bipolar II disorder and MDD but not bipolar I disorder.

Twin, adoption and family studies indicate that genetic factors substantially contribute to the liability for developing bipolar disorder and major depressive disorder. The earlier age of onset appears to be associated with increased transmissibility of both bipolar disorder and MDD.

Taken at face value, adult twin and adoption studies indicate that familial transmission of bipolar disorder is largely a result of genetic factors and that genetic factors are more important in the development of bipolar disorder than in depressive disorder.

The heritability of bipolar disorder is estimated to be 60-70% whereas that of adult MDD is about 40%.

Complications

Bipolar disorder, like MDD, carries an increased risk of suicide and accidental death. Suicide are more common during depressed or mixed manic/depressive episodes, and while intoxicated.

Accidental injury or death are more common in manic state because of poor judgement and increased risk-taking behavior. In the elderly, mania is associated with increased medical morbidity due to malnutrition and exhaustion states from increased activity and decreased sleep.

Mania, hypomania and cyclothymia are all associated with occupational, scholastic and social impairment. The risks of comorbidities such as alcoholic abuse are markedly increased.

Patients with mixed manic/depressive episode appear to have the highest psychosocial morbidity.

Patient behavior - sense of entitlement

Whereas doctors working in the private sector generally enjoyed great respect from their patients -- as a professional whom their patient consults, doctors working in the public sector generally do not
enjoy such status. The trouble? Wages are being paid by the taxpayers, and this often create a sense of entitlement among the citizens.

Given the amount of work, it is not surprising that most doctors staying in the public sectors are enthusiastic towards patient care and are eager to help their patients. However, it should be borne in mind that we doctors are also human beings and have our families and life outside work.

Consider these three questions:
  1. If you are rude, can you expect the doctors to stay professional in their judgement?
  2. If you are swearing, can you expect others to be caring for you?
  3. If you are attacking their colleagues, can you expect them to uphold their professional standards and give their best to treat you?

Unfortunately, for the doctor, their answers to these three question needs to be "yes". However, I wouldn't be expecting a doctor to stay smiling when faced with personal attacks.

"Disorders", "diagnostic labels", and why getting it diagnosed.

More and more people are being diagnosed to have a psychiatric disorders. The keyword here is "disorder". We shall look at how a "disorder" is defined - in essence, in most psychiatric guidelines or manuals, a condition can only be said as an disorder when it causes impaired function in social, occupational, or educational aspects of life.

And when we evaluate the requirements for social, occupational, and educational aspects of life - we can see that over the past 20 years, these requirements have been a monotonous increasing function.

It is perhaps thus to nobody's surprise that we have more such "disorders" diagnosed, especially in Hong Kong. In other countries, and in other cities, if you are not the kind to live in cities, you can move elsewhere, and work a easier life. Not so much in Hong Kong -- there's nowhere to go. Perhaps jumping from height or into the sea, but that's it. It is so unacceptable socially that a person from Hong Kong would go elsewhere to live a lowly life that people would choose to die over going elsewhere.

Definition is one thing, and then we have several groups with vested interest in giving a "diagnosis" to patients: parents, and perhaps patients. Nowadays, instead of "laziness" and "stupidity", people are increasingly referring their child as being inflicted by developmental delay (which is otherwise known as "stupidity" in my days, especially when they are not formally "mentally retarded"), attention-deficit hyperactivity disorder (which is known as "lazy and distracted"), and so on, so forth.

It has become a trend such that all child are bright and beautiful, and only afflicted by a disorder and is therefore so naughty that you teacher cannot work with them. And it's your fault by not coping well with their illness, or by discriminating them based on their ailment.

Honestly, I don't believe in the notion that this generation of children is facing a "psychiatric epidemic".  In my humble opinion, they are facing a "diagnosis epidemic".

People see doctor, people die.

IT is sad that every two or three weeks, we're seeing episodes and episodes of people suffering because the waiting time for special out-patient departments are long. Don't be mistaken - I agree that it is indeed long, what I wanted to say though, is that these high counts of mortality is probably less related to the long waiting time. I believe, however, this is due to patient behavior, as opposed to negligent doctors, failing standards, or poor medical system.

It is, again, a recurring theme that wherever there are poor outcomes, people ask for somebody to take up the responsbility, typically a scapegoat in my humble opinion. People tends to blame the establishment, such as the hospital management, the lengthy waiting time, the lack of medical manpower, or sometimes, it could even be targeting those doctors who are not willing to work too many hours overtime. However, it is very much less common that we see people blaming the patient.

When patients visit their doctor, we call it consultation, and we charge the consultation fee. What this mean is that the doctors are consulted, and to spell it out clearly, if the patients do not visit their doctors, the doctors could do nothing. I think it could be said that our patient population in general has been educated to come to the emergency department whenever their condition changes for the worse.

In this case[1], the gentlemen went to general out-patient clinics for depressed mood. Apparently, what the medical officer did was to refer him for psychiatric evaluation, which, in my books, it means that this patient does not have severe psychiatric disturbances, and there were no signs or symptoms that are suggestive of him being at risk of harming himself or others. Subsequently, he has been evaluated (probably by psychiatric advanced practice nurses -- who are extremely familiar with psychiatric conditions) and was given an appointment ten-eleven months down the road.


What he did was that he killed himself three days after receiving the appointment. At this point it is important to stress on that we doctors works with uncertainty, and are definitely not fortune-tellers who can see the future through a ball of crystal. And for the matter, if any medical graduate could see the future, it's probably better to win a mark-six ticket every now and then instead of working 60+ hours in the hospital every week. 

What is the lesson learnt? If you have got a patient at home, and you see his or her condition changing for the worse, bring them to the emergency department -- this, is the raison d'etre of emergency department.

[1] http://www.vjmedia.com.hk/articles/2014/03/07/65639

Saturday, August 3, 2013

My issues with science teachers

Perhaps 20 years ago, we had "degree teachers" who were among the best students of their time, having read a degree from the two prestigious universities in Hong Kong, The University of Hong Kong, and The Chinese University of Hong Kong. The implications then were that they are well-versed in their matriculation and undergraduate studies, and they know the knowledge by heart, most of the time adequate to explain issues inside and outside the then-british curriculum to students.

For me, secondary science education was a great introduction to science and certainly what led me into clinical medicine and research. For those who believe in that you don't need much more than the curricular knowledge to teach science, I would give two simple phenomenon that I encourage your kids to ask their science teachers:

(1) Why is metallic mercury a liquid at room temperature and pressure, and
(2) Why does a mirror reflect light of most visible wavelength

The phenomenon in both questions are simple, and taught at perhaps primary school or junior forms, however, the ability to explain these to matriculation students (who, presumably, had the prerequisites) are certainly not found in most teachers I have personally met. If one has not heard of the answer before, it's readily derivable from basic principles in relativity and quantum mechanics taught at A-level Physics and Chemistry.

What this example illustrate, is that you need science teachers who knew much more than the mere curricular knowledge to teach, and to inspire students so that we won't miss a potential scientist in the future. If there should be a reason as to why we had less and less locally schooled scientists in the past 10 years, it probably had to do with the ability of teachers these days.