Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
User Journal

Journal: Redux: Optimize performance of EC2 EBS volumes and Amazon WorkSpaces

Journal by kriston

This is an update to my previous Journal article "Optimize performance of EC2 EBS volumes and Amazon WorkSpaces." Along with writing each unused sector, Amazon also recommends reading from each sector. To do this we can use the Windows version of the "dd" command available at http://www.chrysocome.net/dd.

1) Find the name of your drive:
        wmic diskdrive get deviceid

2) Choose one. It will look something like \\.\PHYSICALDRIVE0.

3) Type this command carefully:
        dd if=\\.\PHYSICALDRIVE0 of=/dev/null bs=1M --progress --size

4) When completed, repeat step 3 on \\.\PHYSICALDRIVE1 and any other volume you have on your instance. For example, Amazon WorkSpaces will have a \\.\PHYSICALDRIVE0 for drive C: and \\.\PHYSICALDRIVE1 for drive D:.

These instructions are from this article: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-prewarm.html.

User Journal

Journal: Optimize performance of EC2 EBS volumes and Amazon WorkSpaces

Journal by kriston

Amazon EC2 and Amazon WorkSpaces are very handy. Unfortunately, the first time you bring up any new instance the performance starts slow and improves over time. This is apparent when creating any new EC2 instance on EBS, when creating a new EBS volume from a snapshot. This includes creating an AMI and also copying volumes to other Availability Zones.

The culprit is Thin Provisioning. The EBS volume is only allocated physical space when it's needed. This is fine for Amazon but not so fine for your performance. There is an easy to to remove this millstone from around the system's neck but it will take some time and may cause network charges to do so. It's well worth it if you plan to use the system for regular work, and especially if you use Amazon WorkSpaces as one of your daily desktop environments.

My examples use the "dd" command in Cygwin or Linux. In Windows you can use Cygwin or search for the various dd.exe commands available on the internet.

On a brand-new Amazon WorkSpaces instance, see how much space is free on your "C:" and "D:" drives. On a regular EC2 instance, see how much free space is on all your drives (you will know this already). Write these values down.

Start a shell (or Cywgin shell as Administrator) and do the following. Note that if you're using dd.exe without Cygwin it's up to you to figure out what the "if" parameter would be.

dd if=/dev/zero of=./datafile-40gig.dat bs=10M count=4096
Check how much data is free:
df -kh .
Then repeat the "dd" command again with new values to fill the remaining data.

In this particular example my volume had a little over 40 gigabytes free so I'm creating a file of 40 gigabytes in size. The block size is kept at 10 megabytes. You can fine-tune this but in my experience nearly any values that add up to 40 gigabytes takes the same amount of time to complete.

Of course, when these complete, don't forget to delete the files.

That's it. You don't need to reboot. Thin provisioning has been defeated and you can enjoy better performance on your EC2 and Amazon WorkSpaces instances.

Note: In Windows you could theoretically create a new paging file of 40 gigabytes but I have not been able to prove that Windows actually writes 40 gigabytes to disk or just allocates the 40 gigabyte space as in-use. I suspect the latter, in which case it does nothing to improve performance.

This process can be used on any other storage architecture, virtual machine or not, that is configured to use Thin Provisioning. If you suspect shenanigans are happening in which the storage system knows you're just writing zeroes and defeats you, you can use /dev/random to counteract and force physical alocation. It will take far longer to write the data file, however.

User Journal

Journal: Using Amazon WorkSpaces from Linux using rdesktop

Journal by kriston

The Amazon WorkSpaces product is an interesting and affordable desktop-as-a-service from Amazon. For a flat, monthly rate, you get the equivalent performance of an m3.medium EC2 instance for far less cost but also with somewhat less configuration flexibility. The compelling feature of Amazon WorkSpaces is supposed to be close integration with your own Active Directory with Group Policies. For me, the more compelling feature is the high-performance, proprietary Teradici PCoIP protocol used for remote access instead of the traditional Microsoft Remote Desktop Connection protocol. The PCoIP protocol is much more efficient and faster than RDP but, unfortunately, the Amazon WorkSpaces client is not available for Linux or ChromeOS. With some work you can get access to your Amazon WorkSpace using the conventional Microsoft Remote Desktop Connection or even VNC.

Here is how you can use regular "rdesktop" on Linux and Macintosh, or Microsoft Remote Desktop Connection on Windows to connect to Amazon WorkSpaces. It won't be as fast or as nice as the Amazon WorkSpaces client but it works as acceptably as any RDP connection.

First, open your Amazon WorkSpace and ensure that Windows Firewall has opened TCP port 3389.

Then open a cmd prompt and type ipconfig. Essentially, you are finding out what private IP your WorkSpace is using. Write it down.

In the EC2 Console, poke around to find the public interface associated with that private IP address you wrote down and write down its public IP address.

Again, in your EC2 Console, find the Security Group associated with the public interface you found in the previous step.

Edit the Security Group associated with the public interface. Create a rule that allows TCP port 3389.

Now you can log in using "rdesktop" on Linux or Remote Desktop Connection on Windows. Just use the IP address for your WorkSpace that you found in your EC2 console. If you want to be more elegant, register your WorkSpace's public IP in DNS using Amazon Route 53 or dyndns.org.

You're going to quickly find that Remote Desktop Connection isn't as fast or nearly as responsive as the official Amazon WorkSpaces client. This is because Amazon WorkSpaces uses Teradici PCoIP, a proprietary product specifically designed for high-performance remote desktops. This protocol is much more efficient and faster than Microsoft Remote Desktop "RDP" protocol, but with these steps you can still enjoy access to your Amazon WorkSpaces without being limited to using machines that can run the proprietary WorkSpaces client.

User Journal

Journal: Installing Java for desktop use in /opt/java

Journal by kriston

Putting symlink in /usr/lib64/mozilla/plugins for libnpjp2.so -> /opt/java/jre/lib/amd64/libnpjp2.so

Trying to run a Java app from, say, http://kriston.net/games/, the Java runtime might still refuse to work on the principal of "security reasons." Feh.

Run this as the normal (non-root) user: /opt/java/jre/bin/jcontrol
Click on "Security" tab and select "Medium" which allows the Java plugin to run unsigned Java apps with a prompt.

That is all.

User Journal

Journal: Dell XPS 12 Ultrabook problems

Journal by kriston

The Dell XPS 12 Ultrabook has a number of problems that require too much attention. Perhaps that's why I bought one new today for over $400 off list price. This Ultrabook has a 12.5" 1920x1080 screen, touch screen, Intel Core i5, 4 gigs of memory, 128 GB SSD, and has a nifty screen flipping feature so you can use it like a tablet.

Here are a few problems so far.

The keyboard is bad and the keys stick up unevenly. Normally this isn't a problem but the white LED backlighting points out to you which keys are jutting out. It's okay to type on but I prefer to flip it into tablet mode and plugging in a tenkeyless mechanical keyboard.

More importantly, the touch screen can stop working. What happens is the two I2C HID Devices under Human Interface Devices are disabled by Windows because it "detected a problem." This happens randomly but most often when coming back from sleep. I got used to the touch screen, especially in tablet mode, so I'm not sure I want this feature disabled. Simply doing 'Scan for hardware changes" in the "Action" window will re-enable them but they will eventually stop working again. So updating the BIOS should fix this. The BIOS update from Dell from A03 to A04 updates the BIOS, another Intel firmware (likely the touchpad's firmware since it's an Intel device), and a third firmware, and reboots. Following this, updating the touchpad drivers from Dell should do the trick and I will be watching this for success.

Finally, updating to Windows 8.1 complains that my user is not an Administrator. Well, this is, of course, incorrect. What I did to fix this is to remove the Windows Update 2871389 from the system, reboot (takes a long time), run Windows Update and install updates again, reboot (again takes a long time), and then go back to the App Store to download it again. Finally, now I'm waiting for over three gigabytes to download.

The screen is beautiful and it's too bad Dell and Intel didn't test this Ultrabook enough. They must have lost a ton of money on this model. My local store had around 25 new in stock at fire-sale clearance prices. You can't get a 12.5" 1920x1080 Ultrabook at anything near this price, let alone a Core i5 with 4 gigabytes of memory, 128 GB SSD, and a "carbon fiber" case, whatever that means. Just make sure you have the patience and problem-solving skills to work out the problems.

Windows Experience Index details (before Windows 8.1):
Processor 6.9
Memory 5.9 (bummer)
Graphics 5.7 (Flunky Intel graphics)
Gaming Graphics 6.5 (Flunky Intel graphics)
Disk 8.1 (Superb!!).

A great value for a new Ultrabook over $400 off the list price. Too bad for Dell's profits on this troublesome Ultrabook.

Android

Journal: Why aren't Android binaries stripped for performance? 1

Journal by kriston

I was doing some reverse-engineering of my Nook Color with Cyanogenmod just to see where they store the data for Angry Birds. Most of the configuration stuff is in Lua, which is interesting, but I also noticed that the shared objects have copious help text and even documentation inside them which would never be seen by the end user. These are space-, memory-, and cpu-constrained devices. Why aren't these data stripped out?

User Journal

Journal: Bootstrapping compilers 1

Journal by kriston

This evening I'm building OpenJDK 7 for FreeBSD and it requires me to install an older version of Java to build this version of Java. It reminds me of when we would use the Solaris compiler to build a nominal version of gcc and then use that gcc to build gcc again, and then use the built gcc to build the final gcc a third time.

User Journal

Journal: Scanning documents and cleaning them up

Journal by kriston

Years ago I got into the habit of taking handwritten notes and scanning them into the computer. I then have a digital record and no paper lying around to get lost, stolen, or cluttered.

A problem has arisen with this recently. Late-model multi-function copiers like the Xerox ColorQube scan at such a high resolution and sensitivity that they capture not just the handwritten notes but the texture of the paper. This is extremely annoying because all I want is the writing, of course, and even the "Remove Background" feature of the Xerox ColorQube just doesn't.

So, for the time being, here is a cheap way to remove backgrounds. Load the scanned document into your favorite editor and reduce it to sixteen color palette.

For example, in Paint Shop Pro 4, my favorite for quick-and-dirty fixes, select Colors...Decrease Color Depth...16 Colors and select "Palette Windows'" then "Nearest color" and finally "OK." This magically removes the background noise and so far it has worked on nearly everything I scan.

Be sure you do this after scaling down your image. PSP 4 calls this "Resample" which, by the way, is the only correct way to resize an image in PSP 4.

Journal: Amazon Web Services (AWS) notes

Journal by kriston

Forget CentOS, who are taking too long with 6.x. Amazon AWS with Red Hat Linux 6.1 for $0.085/hour for t1.small is excellent and $0.02/hour for t1.micro is even more excellent for high-availability services.

For file backup services, the S3 reduced-redundancy storage for $0.093/GB is a steal, but make sure you convert your storage buckets to RRS. The Windows Home Server plugin does not set RRS so use an Amazon EC2 instance to run convert_to_rrs.py and quickly convert your bucket to RRS for big savings. The AWS console won't work on huge buckets, nor do the popular Windows-based S3 tools. This might cancel out some of the savings.

User Journal

Journal: How to kick-start Windows 7 updates

Journal by kriston

Do you want to kick-start Windows 7 updates for a computer you've built or set up for someone else? This is what I do and it mitigates the threats to newly-installed machines. It installs certain libraries and other dependencies that trigger Windows Update to give you the latest and greatest. You can let the user do the Service Pack updates at a later time. In this situation we are bootstrapping the update process for most of the important libraries and software you care about without buying Microsoft Office and installing the most important updates before you leave the user to his own devices.

Download and install the following software in this order on another PC and put them on a USB drive.
Do not connect your new computer to the internet yet.
Run these installers in this order. Nothing should ask you to reboot, but if it does, let it reboot and continue with the next one.

Microsoft Word Viewer 2003 (the latest is Word 2003).
Microsoft Visio Viewer
Microsoft PowerPoint Viewer 2007
Microsoft PowerPoint Viewer 2007 SP1 Update
Microsoft Excel Viewer 2007
Microsoft File Format Converters
Microsoft DirectX Redist
Microsoft .NET 3.5 SP1 (Windows Vista and XP Only, x86 and x64 are in the same download)
Microsoft .NET 4.0 Full (x86 and x64 are in the same download)
Microsoft Security Essentials

Restart your computer.
Go to the Windows Update control panel, click "Check for updates," and then install all of the Required and Optional ones.
After you're done with all this, go to the Windows Update control panel and ask it to install "for all Microsoft products". This is somewhat more difficult to find.
Go to Windows Update and hit "Check for updates" again and install everything.

Note that Microsoft .NET 3.5 SP1 includes .NET 2.x and 1.x inside it. Windows 7 has 3.5 SP1 built in already. Windows Vista may or may not depending how old it is.

User Journal

Journal: Cherrypal now runs Android

Journal by kriston

The Cherrypal Asia laptop at http://www.cherrypal.com/ is now shipping with Google Android installed. This replaces the older Cherrypal Asia mini laptops that were running Windows CE and Linux based. Both laptops run the ARM9-based VIA 8505 SoIC platform at 533 MHz with 256 megabytes of RAM and 2 gigabytes of NAND flash. The $148 version has a 1024x600 screen while the sub-$100 model runs 800x480. I'm looking forward to seeing how Android can squeeze more throughput out of the VIA 8505 since Windows CE didn't do such a great job on the original Cherrypal Asia.

User Journal

Journal: Review of ABS mechanical keyboard

Journal by kriston

[Reposted from Newegg because I'm proud of my review.]

Blurb: "Great feel and nice loud sound, but not a Model M clone"

Pros: Loud, ringing reverberation is just like keyboards of old PC clones not made by IBM (see Cons).
The keyboard is only a little larger than the keys take up. This is a major bonus if you like small keyboards but don't want to compromise on keys.
FULL SIZE caps lock key for Unix people who remap CTRL to caps lock. This is rather rare on any keyboard (and I am still searching for a Model M clone with full-sized caps lock either).
The keyboard is nice and heavy as nature intended, with amazing, grippy rubber feet (and really good rubber on the risers, too, also rare).
Stiff, solid, and a very tasteful matte black finish that isn't painted on (the plastic is black).

Cons: The case reverberates a bit with a ring. Your table may amplify or muffle it. I don't happen to care but you might.
This is not a Lexmark Model M keyboard clone and does not pretend to be. The reviewers who think this is a Model M are confusing this with another type of old-school "clicky" keyboard.

Other Thoughts: This type of keyboard is not the same as a Model M. The clicking noise comes from the keys landing, not from the (very faint) click in the key mechanisms themselves. However, the click happens at the moment of keystroke actuation which gives this a nice touch. I didn't feel any of the "halfway down" actuation some other reviewers claimed.

This keyboard is an excellent a clone of those "other" clicky keyboards that came with Compaq IBM PC clones in the late 1980s and early 1990s. I have about twenty real IBM/Lexmark Model M keyboards in various states of repair. Those boards click loudly as the key is struck and also when the key hits the back plate. This one only really clicks when it hits the back plate. If you had a PC clone in the late 1980s or early 1990s you know this feel. I think some people call it the "Cherry" feel.
It's not better or worse than the Lexmark Model M; it is just different.

User Journal

Journal: Cherrypal Africa Windows review

Journal by kriston

The unit is a very small and light, slightly customized version of those $100 laptops that have been spreading across Asia for the past year or so. The model I ordered runs Windows CE 6.0 and a suite of custom installed programs like various media players and document viewers. The Youtube application does not work but the rest work fine. The machine is rather slow but it browses the web just fine. The word processor is also good. Some applications are formatted for Pocket PC (the menu bar is on the bottom instead of the top) but Windows CE users are used to this. A benchmark I ran says 200 MHz but I believe that speed is actually due to power management which is always adjusting the CPU speed based on your usage of the unit.

My unit came with some nasty glue that I had to clean off, presumably from stickers that were removed from the original manufacturer. The Cherrypal brand stickers are coming off, too.

I had to order this thing four different times. The credit card processor changed each time, too, but no money was stolen from me. The Cherrypal people say the delays and strange circumstances were due to hacking attempts but my own observations make me speculate that too many customers complained to the credit card ordering processor which caused Cherrypal's account to be terminated for undelivered goods. I persisted through four different ordering processors since December of 2009 and eventually got my unit in late March 2010.

When you order the Cherrypal Africa you are not guaranteed any particular processor type, memory, or screen size, just the minimum specs. This means that your processor can be ARM, MIPS, some x86 variant, or maybe even a PowerPC. Most people seem to have gotten what I have, which is a "VIA" ARM-VT8500 and I'm not really sure if that's the real "VIA" from Taiwan. It also has 128 meg of ram, WiFi, and 2 gigabytes of NAND flash.

In conclusion, I expected what I had received, which is an extremely basic laptop. One thing I didn't expect though was that the "Windows XP" spec was changed to just "Windows" when I had originally ordered it. If I had realized that it is Windows CE I would have ordered the Linux version instead.

User Journal

Journal: Install Go-OO version of OpenOffice on Fedora

Journal by kriston

OpenOffice, the free desktop office application suite, is almost totally compatible with Microsoft Office. It does not support *.docx files and other proprietary (non-free) elements that are needed to share documents with users of Microsoft Office. Novell has solved this with their own version of OpenOffice but it is only for Windows and SuSE Linux. For Fedora users the Go-OO version can be used. Go-OO is the special version of OpenOffice with the non-free elements which Novell's version is also derived from. It should be noted that Fedora's version of OpenOffice is also Go-OO with the non-free portions stripped out.

The challenge is to replace the OpenOffice that cannot be removed from Fedora with this new, enhanced Go-OO version. It's not easy because OpenOffice is a core desktop application and Fedora forbids its removal without removing about 300 other packages that make up the desktop operating system. We're going to force an installation of Go-OO on my Fedora system, uninstall the "required" OpenOffice, and then force another installation of Go-OO on top of that to get things cleaned up.

Go to http:/www.go-oo.org/ and read the documentation.

Run Go-OO's downloader script in its own directory:
        mkdir GO-OO ; cd GO-OO
        wget http://go-oo.org/download/download-go-oo.py
        chmod a+rx ./download-go-oo.py ./download-go-oo.py

Forcibly install everything it downloaded:
        sudo rpm --install --force *.rpm

Remove the original OpenOffice packages:
        sudo rpm --erase openoffice.org-math-core openoffice.org-presenter-screen openoffice.org-opensymbol-fonts openoffice.org-core openoffice.org-math openoffice.org-brand openoffice.org-calc-core openoffice.org-impress-core openoffice.org-writer-core openoffice.org-graphicfilter openoffice.org-draw-core openoffice.org-langpack-en openoffice.org-xsltfilter openoffice.org-impress openoffice.org-writer openoffice.org-calc openoffice.org-extendedPDF

Install Go-OO forcibly again:
        sudo rpm --install --force *.rpm

Now it's all set. I can read and write *.docx and *.xlsx files in Fedora. It's also much faster than Fedora's OpenOffice.

The idle man does not know what it is to enjoy rest.

Working...