Sunday, January 24, 2010

SACK not necessarily a good thing

Having fun testing large data transfers between Mac OS X, Linux 2.6 and Win7 machines.

I was getting very low transfer rate between the Win7 and Linux boxes (12 Mb/s) versus 92 Mb/s for other combinations.

This setting fixed it:

/sbin/sysctl -w net.ipv4.tcp_sack=0

From: http://datatag.web.cern.ch/datatag/howto/tcp.html

SACKs (Selective Acknowledgments) are an optimisation to TCP which in normal scenarios improves considerably performance. In Gigabit networks with no traffic competition these have the opposite effect.
But now, I have to figure out why I'm getting less than 100mb/s>

Saturday, January 23, 2010

Remote ssh connections, No buffer space

While testing the wonderful UDT, I had the following problems on Mac OS X:

#1

ssh connection being denied (even if Preferences > Share > Remote Login was enabled).

It appears that the UI configuration tool is broken and doesn't allow sshd-key-agent.

Change Preferences > Security radio button to Allow some connection. You should then be prompted for sshd-key-agent.

#2

While starting the client app that creates rather large buffer and UDP packet, I got the following:

$ ./appclient 192.168.0.195 9000
connect: Connection setup failure: unable to create/configure UDP socket: No buffer space available.

This can be solved with:

$ sudo sysctl -w kern.ipc.maxsockbuf=80000000
kern.ipc.maxsockbuf: 8388608 -> 80000000

Friday, January 1, 2010

Start Up Nation

http://freakonomics.blogs.nytimes.com/2009/12/04/how-did-israel-become-start-up-nation/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+FreakonomicsBlog+%28Freakonomics+Blog%29

Travel tips

Buy a good carry on, certified by an airline for cabin use. It should have good, large wheels (rollerblade type), a solid handle and many pockets with high quality metal zippers.

Attach a colorful piece of clothing on your luggage to make it easy to identify when you do the luggage claim.

Always bring a pen. For some weird reason, some places such as the US customs in Montreal's PET airport never have any pen.

Always check in online 24 hours before the flight. You may save money (discounts on checked in luggage), time (use of the self checkin terminal) and also a good safety net since the airline knows you'll be online.

Bring snacks; airlines are increasingly skimpy on food.

Make sure to fill out all the necessary forms before you get to customs.

Layer comfortable clothing so you can put and remove items as ambient temperature changes.

Make a checklist and keep updating it as you think of things to bring days before actually packing.

Travel lightly: figure out clothes that can be combined on your trip.

Bring moisturing cream to get around the dry air in the plane cabin,

Don't hesitate to remove your shoes to make yourself confortable.

Essentials: toothbrush, toothpaste, floss! Medication too of course.

Like to swim? Bring your bathing suit - you never know when your hotel will have a pool or a sauna.

Check EVERY pocket for liquids in your backpack and carry on before going through security.

Review visas and passport expiry date weeks before leaving. Renew passport so it is never less than 6 months before leaving.

Have currencies (or even better, credit cards) for both your origin and destination.

Make sure you have sufficient cash in your bank account. Make sure your debit card has a NIP of more digits (ATM in some countries have a limit of 4 digits) and setup automated payments for all accounts.

If you buy plane tickets months in advance, buy insurance for unexpected cancellation. Preferrably buy plane tickets in a window of 30 to 14 days before departure.

Packing your pieces of clothing in rolls instead of flat is more efficient and leads to better packing.

Make sure any bottle of liquids that could accidentally open or break are in an hermetic plastic bag.

Stick fragile objects in a box placed in a luggage for extra protection.

Squeamish? Bring a bottle of anti-bacterial hand cleaner.

Comfortable, slip on leather shoes that look both nice and can be used to walk anywhere. Don't skimp on both time and money to find the ideal pair of shoes. Personal prefence is for Ecco, but try them all!

Don't forget to bring a book or a magazine: it will make transit and waiting lines not as painful. Consider getting an ebook (such as a kindle).

Don't forget to charge all your electronic devices and spare batteries. Pack the various chargers and adapters.

Read up on the Wikipedia entry for your destination to make sure you don't miss out on anything.

A smartphone with wifi is increasingly useful as a portable mini computer to make reservations on the road.

A bottle opener can be useful but make sure it ends up in the checked in luggage.

Small first aid kit just in case.

Sunscreen is a must in sunny destination. Get the highest SPF possible.

Clean up your wallet and remove anything you won't need before leaving.

Keep all your passport number, credit cards, emergency phones online (suggest Google Docs).

Keep your addressbook (on your phone?) updated with your friends and family addresses so you can send them postcard.