Sunday, February 24, 2013

sata UMS

have to buy some disposable HDD for my mythtv cache... with the high prices of HDD i will buy one of those fancy usb3 enclosures, use the 1TB HDD that comes inside, and keep the usb3<->sata converter to use as a sata dock.

first, is it worth?

- the cheapest 1TB 3.5" drive goes from $75 to $200.
- usb3.0 enclosures with 1TB drivers goes from $69 to $140. averaging $80.

So, Price does checkout. it's even better than buying the bulky 3.5" drive!

- all regular HDD are 7500RPM, sata2-6gb/s, and have 32Mb~64Mb or cache.
- all usb3 enclosures are 5400RPM, sata2-6gb/s (counting the internal drive) and have 8mb~16mb of cache

The cache (32 vs 8mb) may make a big difference on accessing recently written files and random access of cached data. I do not expect to have such use case using the HDD as a mythtv cache disk. Also, performance of the regular drive is around 100Mb/s on sustained read and writes. the same reported over usb3 for the other drives. in fact, the same as reported on usb2 as well. the drive is the culprit.

7kRPM vs 5kRPM may make a difference in some cases, but again, for a mythtv cache writting/reading low bandwidth MPEG2 video steams, not the case.

So, performance does checkout.


Product options

Seagate Backup Plus 1TB USB 3.0 Blue Portable Hard Drive STBU1000102

$89
sata drive inside! yes. seagate.
usb2 ready: no.
easy to open: yes/no. the sata USM connector pop's out easily and by design. but the actual HDD enclosure does not open at all.

HGST Touro Mobile 1TB USB 3.0 External Hard Drive, Black (HTOLMX3NA10001ABB)

$81 
sata drive inside! yes. Hitachi/WD
usb 2 ready? no idea.
easy to open: no.

Toshiba Canvio 1.0 TB USB 3.0 Basics Portable Hard Drive - HDTB110XK3BA

$69 (also 1.5TB $103)
sata drive inside! yes. hitachi (hitachi 2.5" are made by WD, but this is branded Toshiba, why?)

Transcend Information 1 TB USB 3.0 External Hard Drive - Military Drop Standards (TS1TSJ25M3)

is this a StoreJet model?

$90
if same as storeJet:
sata drive inside: yes! Samsung
usb2 ready? no idea
easy to open! yes! 4 screws!

Adata DashDrive

$98
sata drive inside? no idea.

slowest of the lot. 90mbps sustained write/read.
fricking water and fall proof!
it's bulkier than the rest, but the usb3 cable goes IN the design. awesome.

LaCie Rugged Hard Disk Triple 1 TB USB 3.0 Firewire 800 (2x) Portable Hard Drive 301984

$170.

sata drive inside? no idea.

usb2 ready? no idea.

very cool enclosure.

easy to open! yes

WD Elements SE Portable 1 TB USB 3.0 External Hard Drive - WDBPCK0010BBK-NESN

and

WD My Passport 1TB

$81
sata drive inside: NO. (they have a 3.5" drive with a logic board that actually only have USB3 connectors!)

Brands

brands. Previously i had nightmares with WD, and loved Hitachis. But hitachi sold in 2012 all it's SSD and 2.5" factories and brands to WD, and all it's 3.5" brands and factories to toshiba. So Hitachis are no more. Hence, i couldn't care less for brands at the moment.

Sunday, January 20, 2013

fixing dialogs in gnome

http://askubuntu.com/questions/109321/popup-dialogs-attached-to-window-title-and-not-movable

Sunday, January 6, 2013

removing Unity from Ubuntu 12.04.1 LTS

aptitude remove empathy libunity-2d-private0 libunity-core-5.0-5 libunity-misc4 unity unity-2d unity-2d-common unity-2d-panel unity-2d-shell unity-2d-spread unity-asset-pool unity-common unity-greeter unity-lens-applications unity-lens-files unity-lens-music unity-lens-video unity-scope-musicstores unity-scope-video-remote unity-services

edit: lightdm will not work at all without unity-greeter. ubuntu sucks more each day

Wednesday, March 23, 2011

simple rsync

How to use rsync logic to copy only modified/new files and not have to run any service on the other host.

basically you will have the same result/security/convenience as running scp
scp -r sourcefiles/* destination.host.com:/destination/

but with the added rsync logic:
rsync -r -v -e ssh sourcefiles/* destination.host.com:/destination/

Tuesday, December 14, 2010

simulate a distant host in localhost

simulate 200ms pings. (100ms each leg)
tc qdisc add dev lo root handle 1:0 netem delay 100msec


Restore it back to normal again with:

tc qdisc del dev lo root


TODO: script to set that every second to a random value from 10 to 100

also:
iprelay -b30000 8000:localhost:80


references
  • from http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
  • also in http://news.ycombinator.com/item?id=2004790
  • docs in http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

usable tackaball

got a logitec usb trackman from ergo last week. really liked the middle style trackball, but missed scroll. the solution:

wrotenote-lx$ cat logitec_usb_trackball.sh 
#!/bin/sh
# 1 2 3 4 5 6 7 8 9
#xinput set-button-map "Logitech USB Trackball" 8 9 2 4 5 6 7 1 3
xinput set-button-map "Logitech USB Trackball" 1 9 2 4 5 6 7 1 3
# LF rt lf RT
# LF = big left button
# RT = big right button
# lf = small left button
# rt = small right button

# liga emulacao do whell por movimento do mouse
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 8 1
# diz q par de botoes o movimento no eixo X "clica"
#xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation X Axis" 8 6
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Axes" 4 5 6 7

# apertar o botao 1 ativa emulacao acima
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8 1



the buttons now do:
  • Big left button:

    • click for Button 1 (left click)
    • Hold for scroll on the trackball moviment (all four directions)

  • small left button: always button 1 (so i can drag things and select text)
  • small right button: Button 3 (right click) my least used button
  • Big Right button: middle click. I used that button a lot, to paste and thown windows to the bottom of my desktop zindex.

usable tackaball

got a logitec usb trackman from ergo last week. really liked the middle style trackball, but missed scroll. the solution:

wrotenote-lx$ cat logitec_usb_trackball.sh 
#!/bin/sh
# 1 2 3 4 5 6 7 8 9
#xinput set-button-map "Logitech USB Trackball" 8 9 2 4 5 6 7 1 3
xinput set-button-map "Logitech USB Trackball" 1 9 2 4 5 6 7 1 3
# LF rt lf RT
# LF = big left button
# RT = big right button
# lf = small left button
# rt = small right button

# liga emulacao do whell por movimento do mouse
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 8 1
# diz q par de botoes o movimento no eixo X "clica"
#xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation X Axis" 8 6
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Axes" 4 5 6 7

# apertar o botao 1 ativa emulacao acima
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8 1



the buttons now do:
  • Big left button:

    • click for Button 1 (left click)
    • Hold for scroll on the trackball moviment (all four directions)

  • small left button: always button 1 (so i can drag things and select text)
  • small right button: Button 3 (right click) my least used button
  • Big Right button: middle click. I used that button a lot, to paste and thown windows to the bottom of my desktop zindex.