mbp 2011 sata 6 temporary DIRTY 'fix'

Kilobyte Kid

mbp 2011 sata 6 temporary DIRTY 'fix'

Hi.

I discovered that my mbp 2011 has sata 6 problems with ssd..

I found a video file which 80-90% triggers beachballing. I tryed a lot of different 'solutions' as repair disks, turn off motion sensors etc, but nothing works for me. Than I tryed 10.6.8 beta 3 . still beachballing...

 

 

so my solution:

 

1) open console

2) make a big file (2 x your_mem_size)

dd if=/dev/zero of=testio

and wait until it fills up) I made 16g file for my 8g mbp

MacBook:~ e$ ls -lah testio

 -rw-r--r--  1 e  staff    16G  1 июн 23:34 testio

3) run this command

while [ 1 -lt 2 ]; do dd if=testio of=/dev/null ; done

 

while this process is up and running I had not any beachballs but had 100% cpu load and a lot of power consumption.

 

how it works: the problem is in LPM(power management) so we made IO load and ssd doesnt go to any 'sleep ' state.

 

20 Replies
Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

Wouldn't this dramatically shorten the SSDs lifespan?

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

no, cus we dont write, only read.

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

So basically you sacrifice system performance to keep the system running.
Far from ideal, but better than nothing. Good catch!
JEDEC Jedi

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

Neat.  Presumably a developer could easily and quickly write a program to frequently utilise the I/O, but to some lesser extent to reduce the CPU load?  You can't surely need a constant read to prevent LPM do you?  I don't have a Mac so I can't help. Smiley Sad

_______________________________________
How do I know what memory to buy?
Shop for your region: US | UK | EU | France |
I think my memory is bad. What do I do now?
FAQs and Top Forum Solutions
Did a user help you? Say thanks by giving Kudos!
Still need help? Contact Customer Service
Want to be a Super User?
Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

Hi again!

After reading SATA docs and 'hdapm' utility source code, I discovered that APM Level SATA command wakes up disk from "ALPM sleep". So I modified the source code to flood ssd with set APL level commands to prevent ALPM Slumber state (which disk enters after 10ms idle), but disk still can enter the Partial state(10microseconds) to save your battery power.

 

so the link to modified hdapm utility. source and binary included.

http://zalil.ru/31203752

 

##To run hdapm root access required

 

I copied hdapm to /usr/bin and created the file /etc/rc.local 

/usr/bin/hdapm disk0 max > /dev/null &

 

now hdapm utility runs every time I boot Os x in background.

It eats about 5% of cpu usage.

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

Nice hack idea! But when LPM only happens after 10 minutes Idle time, why flood the SSD and cause CPU load instead of just issuing the command every 9 minutes?

 

Still leaves the question why SSD vendors cannot implement proper LPM handling (obviously it works with the Apple branded* drives)?

 

*Removed competitor name as per guidelines*

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

not 10 minutes, 0.01 sec.

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

http://img84.imageshack.us/img84/7749/20110606183034.png

 

here is my system with this hack installed. 5% cpu load and no beachballing..

Kilobyte Kid

Re: mbp 2011 sata 6 temporary DIRTY 'fix'

Does the video happen to be on Youtube or something? I am still looking for a way to reproduce beachballing my my 2011 MBP. Had it two times now, but that's a bit thin for sophisticated testing.