Using my new kWh power meter

I bought a single-outlet energy meter for $20 off newegg couple weeks ago, and it’s about time to take at the data. The surge protector connected to it powers pretty much everything required to run my computer, so even thought it doesn’t meter the rest of the household I can figure out the rest by estimation.

Attached devices:

  • 4-port router
  • 5-port switch
  • cable modem
  • 430W power supply for my main computer
  • 130W 30″ monitor
  • speaker system for our tv
  • 2 laptop chargers

The reason why I bought was because on our last month’s power bill, my roomates and I somehow used $180 of electricity, up from $150 the month before. Including some mysterious “distribution fees” and using basic math, I found out that our electricity is costing us $0.24/kWh, $.07/kWh for the first ~200 kWh and $.10/kWh beyond that, kind of like how text messages start costing more if you use over 9000.

Meter Readings:
sample 1: 35.65 kWh/165 h = 0.216 kWh/h
sample 2: 62.28 kWh/383 h = 0.163 kWh/h
wattage: 298 W

Projections:
~$.072/h while in use
~140 kWh/mo for moderate usage
~$33.00/mo for moderate usage

I was using these numbers to compare with the costs I faced on the same month’s AWS bill. Seems like a virtual EC2 instance is only $.02/h more expensive, pretty worth it since all I’m getting at home is power, not hardware.

I wonder if I’ll ever be able to let go enough to run everything off my small laptop and save all files to an unknown location in the cloud?  My drives are getting old so I was thinking about it, but it’s still too scary having no physical barriers, all somebody would need is a few passwords to gain full access to all my files.

Posted in blog entries | 1 Comment

Goodbye Google Reader Subscriptions

I deleted a bunch of subscriptions from my reader account last week, hopefully it will greatly reduce time waste on useless news that’s not related to my work or main interests. When I first set up my account I would go through every single title for about 60 RSS feeds… there could be thousands of them, but I felt a light OCD to mark them all as read and then I would be done for the day. That lasted about a week, until I remembered that the web is an endless ocean of information that’s better accessed through focused search rather than trying to be constantly up to date with everything.

So now the feeds I have left are those from my friends’ blogs, a few blogs like Mark Cuban and Umair Haque, industry news for work, some manga releases, a few sites with asian news, a small selection of new technology blogs, and some art or design blogs for rapid-fire visual stimulation (I like to scroll constantly through 1000 pictures at once, ~1/4 second each, stopping if something catches my eye). Finally I have a few video feeds like HNNcast, The Daily Show, and TED.

Posted in blog entries | Leave a comment

My Amazon EC2 server specs

So lately I’ve been working on a multi-user database on Amazon EC2 using Ubuntu Server 9.10 (Karmic Koala) and postgreSQL 8.3.

I wrote in the last entry about how cool it is that you can connect hard drives so easily, and I want to say something more about it. While I was reading the fine manual, I learned about partitioning the database for increased performance.

When I say that my database is fully partitioned now, that means that I’ve spread my data out over multiple drives so that multiple read and write operations can be going on at the same time, where a single drive would be wasting a lot of time in seek mode. Thanks to Amazon’s Elastic Block Storage, I can create disk volumes that are only as large as I need them to be. In this case it’s 1-5GB (when’s the last time you saw a 2GB HDD for sale?) If I was building a computer on my own, the smallest I could get would be 40GB, so if I wanted to attach 5 of those, it would cost quite a bit even using small drives. But on Amazon, I only pay $0.15 / GB for every month that I have the volumes reserved. Checking my current AWS statement, for the 15 days in November it’s only cost me ~$1.50 for the hard drive space and ~$20 for the server time. Sweet!

Now, it may sound really great when I say it like this, but I’m still not sure how well the drives perform vs a non-cloud drive. So the next step is, I’m going to try to figure out what the standard benchmarking procedure is and do some testing.

Here’s the specs for my drive setup:
5GB mounted from /dev/sdh – used to store raw data
1GB mounted from /dev/sdg – used to store write-ahead logs for postgreSQL
2GB mounted from /dev/sdh – used to store pre-generated queries of type A
3GB mounted from /dev/sdi – used to store pre-generated queries of type B
2GB mounted from /dev/sdj – used to store pre-generated queries of type C

Also posted in work-related | Tagged , , , , | 2 Comments

My new favorite websites – November 2009

Amazon Web Services – this is the management console for Amazon EC2, where I’ve been working on a cloud-hosted linux postgreSQL installation for the last few weeks. After many years of having to mess around with cables and hardware, EC2 is a revolution! I can create drives of any size out of thin air and attach them to the computer with a few clicks, and when I’m done with them I can make them disappear just as easily, no more worrying about wasting unused hardware! The same thing goes for the servers themselves. Even though 8.5 cents per hour for a linux instance sounds cheap, the cost still builds up quickly over time, that’s $60/month to run a server, almost as much as my home internet.

citysounds.fm – this is a music site that scrapes music from soundcloud all day, every day, from independent artists all over the world. These are mostly people who know how to use software to make music, so the tracks are filled with lot of cool effects if you listen through headphones. Citysounds organizes the recent uploads by city, so you can get new music from the city of your choice. Los Angeles is my favorite, but I also like Sao Paolo and Buenos Aires.

MAGMA This is a video aggregation site that shows a dashboard of the latest videos from a lot of popular providers… since it shows about 50 thumbnails it’s easy to find at least one video to watch quickly while taking a break or eating a snack.

Posted in blog entries | 1 Comment

copy statements in postgresql don’t obey rules on insert

When looking for a table, a user will always search their own schema first, then the public schema. When combined with table inheritance, this allows the creation of user-specific tables that isolate a user’s data but can still be included in aggregate queries by selecting from the master table.

The statement: ‘COPY tablename FROM STDIN;’ performs an INSERT of data received from the client, but does not obey RULEs ON INSERT to a view. It will still activate triggers, but unfortunately, creating triggers on views is currently beyond my skill level.

Posted in blog entries | Leave a comment