SSD benchmarks

I’ve recently purchased an SSD upgrade for my Asus Eee PC 900 (XP). It will be a size upgrade (from 16 GB to 32 GB) and it should be a speed upgrade as well. I decided to do a benchmark of every SSD I currently own in order to compare their performance.

TL;DR: Jump to the results

The contenders

I have four SSDs. They vary in size, and as we’ll find out, speed.

Short name Size Disk ID Comments
Samsung internal 8 GB SanDisk iSSD P4
64BG external 64 GB M4-CT064 M4SSD2 Crucial M4, connected by USB 3.0
Eee PC internal 16 GB ASUS-PHISON SSD
New Eee PC internal 32 GB STT_RPM32GLSE Super Talent, purchased here

Getting the benchmarks

First, I had to choose a benchmark tool that would benchmark both the internal SSDs (Actually the Samsung internal is soldered onto the motherboard) and the external SSDs. I chose a familiar tool, the Disk Utility in Ubuntu 12.04.3. I used the old version after running into this bug on Disk Utility in newer versions of Ubuntu.

This benchmark tool works well for read benchmarks, but for write benchmarks it has a quirk of wanting the disk to have no partition table. Yep, you’ll have to delete all your partitions as well as the partition table. When I benchmarked the Samsung internal, I had to first backup the disk with Clonezilla, then restore the disk after the benchmark completed.

I benchmarked the first three drives listed above, then upgraded the Eee PC’s drive in order to benchmark it.

Upgrading the Eee PC 900

I upgraded the SSD following the recommendation of this article. So before installing the new SSD, I updated the BIOS. This was fairly straightforward. I went to the ASUS support page for the Eee PC 900 XP and downloaded BIOS version 1006. I unzipped the file, and in order to get it to install, I had to rename the file to 900.ROM. I copied 900.ROM to a 256 MB USB stick, and inserted it in the left USB port. Then, when the POST screen showed, I pressed Alt+F2 and got the BIOS update screen. Pretty cool.

Results and conclusion

Read and write benchmarks for solid state disks
Device Average Read Rate (Mb/s) Average Write Rate (Mb/s) Average Access Time (ms)
Samsung internal 137.0 21.2 0.4
64GB external 200.1 51.7 0.2
Eee PC internal 31.3 9.9 0.7
New Eee PC internal 135.8 23.7 0.5

In conclusion, the Eee PC has enjoyed a decent upgrade. Twice the storage space, and a SSD fast enough to compete with the Samsung internal SSD soldered onto the motherboard!

Moving a WordPress blog to Nearly Free Speech

Up till recently, this blog has lived on WordPress.com. Now I’ve moved it to http://www.rratliff.com/, where I have control over more of the configuration. I’ve had some experience with WordPress before, but I wanted to update my knowledge. Also, with all this recent talk about privacy on the web, I wanted to set up my own server and see how I could eavesdrop on my visitors learn about it.

For my non-tech friends, here is some quick background. WordPress is two things. It is a blogging software, which anyone can install on a web server that they control. It is also a company who has installed this blogging software on WordPress.com. They control it, but they give it away as a free service (and also have a paid service for those who want more advanced features.) I’ve chosen to move from the free service to the service that I can control. Now I pay NearlyFreeSpeech.net some money to host my blog on their site, but again, it gives me more control over the configuration, and more opportunities to learn.

Things I learned

  • How to list all the tags in Subversion. (I used this to make sure I was downloading the most recent version of WordPress.)
  • An SQL process can have multiple databases in it.
  • WordPress can use a single database to host multiple sites by using a table prefix.
  • In the world of web servers, file permissions matter. For most of my life up till now, I’ve been working on single user systems. Therefore I have not needed to worry about the group and other sections of the unix permission modes.
  • The ability to export and import a blog from WordPress.com to self-hosted WordPress is pretty cool.
  • How to install a WordPress plugin manually. The fastest way is to SSH into the host and wget the zip file. Then unzip it there.
  • My hosted site does not utilize HTTPS right now. Therefore several passwords that I use to administer WordPress are transmitted in the clear. Say hello to my government surveillance friends, and hackers too? Hopefully not.
  • Piwik is a really cool way to do web analytics. There’s two pieces.
    • One is the Piwik tracking Javascript, which is added to all pages on my website. This can be done by the WP-Piwik plugin.
    • The other is the Piwik web server, which handles the requests from the tracking Javascript and then stores the information in the database. It also provides a Dashboard for admins who log in to view the analytics data.
    • Also, Piwik can anonymize part of visitors’ IP addresses to reduce the amount of personal information that is collected.
    • Google Analytics provides a free (as in price) service, but my analytics data is being aggregated with the analytics of a lot of other website, thus contributing to Google’s database. They use this for marketing, which I view as a form of corporate surveillance.
  • WordPress by default does not generate valid HTML. I fixed it on my site by modifying functions.php. See WordPress category tag validation error fix for more information.
  • I installed the Use Google Libraries plugin to change the jQuery to use Google hosting. This has a small speed benefit for users.

Still to learn

  • How to get Apache to do what I want. I really want a good rating in Google Page Speed. Two sticking points right now are leveraging browser caching and enabling gzip compression. There are WordPress plugins that will manage my .htaccess for me, but I think it would serve me well (pun intended) to learn how to configure it myself. Another tool for testing blogs is ismyblogworking.com
  • It would be cool to set up a staging environment, where I can work on plugins and WordPress tweaks without worrying about disabling my production website.
  • It would be nice to have blog posts and pages stored as files instead of in a database. That way I could put them under version control.
  • Either WordPress or my web host has poor performance, because I’m getting the “Reduce server response time” suggestion pretty consistently from Google Page Speed. I know a static site would help immensely in this area, but at the cost of some convenience of administration.
  • Even cooler would be to tie the version control and the staging environment together. When I am happy with the way my blog looks in the staging environment, I can commit the changes, then push (deploy) them to the production blog.
  • My host supports some sort of HTTPS/SSL. I’d like to learn more about this and then consider asking them to enable it.
  • Another suggestion from Google Page Speed is “Eliminate render-blocking JavaScript and CSS in above-the-fold content.” To fix this will require diving into WordPress themes, which I am not looking forward to.
  • There are more recently popular blogging frameworks, such as Jekyll or Octopress.

Spies, surveillance, and God’s power

Also known as: A theology of government surveillance (part 2). Part 1 was here.

The Bible is 2,000 years old. Technology back then was pretty simple. So I don’t read the Bible because I’m looking for exact answers on what to do. Instead, I read it to learn principles. These principles transcend the technology that is here today and obsolete tomorrow. These principles address who we are as humans, and who God is as the creator.

The creatures and the Creator

  • Achan sinned by taking the spoils of war that were to be dedicated to God. The consequences were dire: Israel lost a battle. Achan’s sin was not kept private, but “all Israel” participated in the stoning of him and his family (Joshua 7:25).
  • God sent spies to the promised land. They were asked to report on the reality of the land that they were attacking, and Moses told them to “be of good courage” (Numbers 13:20). When the spies came back and gave their report, their courage was lacking. They said “We are not able to go up against the people, for they are stronger than we are” (Numbers 13:31). These spies disobeyed because they forgot the reality that God is great. However, the spies’s words led the whole congregation astray, and the people complained bitterly. They failed to trust in God to be stronger than the nations they were opposing. The consequence for the false report was 40 years of wandering in the desert!
  • Through the coming of the wise men, Herod learned that the king of the Jews was born. He was afraid of this new information, so he asked the wise men to tell him where Jesus was. When they did not, Herod ordered that all male children under two years be killed in Bethlehem.  But Joseph was warned, and Jesus was not in Bethlehem when the killing happened. It seems that God was in control over the situation. Herod knew something (the king of the Jews is under two years old and in Bethlehem), yet he didn’t know something (where he is located). Joseph knew something (that he should flee to Egypt), but he didn’t know something (the exact nature of the threat). Yet God was in control, and prophecy was fulfilled by the tragic actions that happened. (See Matthew chapter 2)
  • While David is on the roof of the king’s house, he sees a woman bathing. While this woman might have wished that her naked body remain private, David now sees that she is beautiful. David has not sinned up to this point, but what he does next is entirely his responsibility. He inquires about the woman and learns her name is Bathsheba (2 Samuel 11:3). Spies may or may not gather certain information that we wish to be held private, but it is their responsibility what they do with that information.

Reading these stories (can you think of others?) helped me remember that God is in control and I am not. I am reminded of God’s attributes (as I wrote about earlier) and of my position before him as a child of God, clothed in righteousness because of the death and resurrection of Jesus Christ. Now I am ready to respond to the situation in front of me!

Our response

When faced with recent revelation that the United States government is overstepping its constitutional bounds in searching and seizing our data, how should we respond? I don’t think we should panic or become paranoid. After all, we should not fear those who kill the body, or spy on it, and after that have nothing more that they can do. But fear him who sees all and has authority to cast into hell! (Luke 12:4-5)

So if you’re reading this and you don’t know Jesus and trust in him for the forgiveness of your sins and to change your eternal destiny, please trust him now! His work has been done, and that is good news. (Others have written and spoken about this–here’s a good starting place.)

If you do know Jesus, then God has an interesting kind of surveillance over your heart: “O Lord you have searched me and known me” (Psalm 139). Indeed, the very hairs on your head are numbered (Luke 12:7). (Even the NSA and the CIA don’t know that.)

Getting practical

I love the reminders from the Bible. They help me worship God. Still, my original issue is unanswered, how do I maintain the security of my data in the face of government surveillance?

Much of this surveillance is in response to the terror attacks of 2001. I ask myself, what is my response when tragic events happen in the world? In Luke 13:1-5, Jesus uses some contemporary tragic events to make the point that we should repent. Terror attacks remind us that life is short, and we need to be ready to die. I think that many Americans have failed to see this reminder, and our government has decided that what is best for us is to be “safer.” So we change some security rules, hoping that someone will notice that we tried to make our country “safer.”

An ideal government would do what is best for the people. But I know that I live in a fallen world. Sin affects the relationship between people and their God, and it affects the relationships among people. Therefore, I am not surprised when my government is imperfect. I can pray for my government leaders and (praise God) I live in a country where I can write my representative leaders and vote in elections.

Still, in the short-term I would like to keep my data private. Some people will say, if I haven’t done anything wrong, why should I worry? I can’t address the answer to this question here, because it would take too long, but Daniel J. Solove has written an excellent answer in his article Why Privacy Matters Even if You Have ‘Nothing to Hide’.

After reading that article, do some research and learn how much information about you is being collected: by the government, by the cloud services we voluntarily use, and by the advertising agencies that track us on the web. Then do something about it. Maybe delete a few cloud services, and install a cookie blocker on your web browser. Some changes will be minor, some may be a little inconvenient, and some are more drastic. It is up to you.

USB hardware smackdown

Continuing in the vein of my USB 3.0 benchmarks, I’d like to compare the USB 2.0 controller on my Samsung Chronos Series 7 NP700Z3A laptop (purchased in 2012) and my HP Compaq dc7900 CMT desktop (purchased in 2009).

My two flash drives for testing are the SanDisk Cruzer Red and the Kingston DataTraveler 111.

For both machines, I ran Ubuntu 12.04.3 amd64 desktop edition, and used Disk Utility (3.0.2) to perform a read-write benchmark.

Samsung Chronos Series 7 NP700Z3A

Average and maximum read rate for a read-write benchmark on the Samsung laptop
Device and port Maximum Read Rate (MB/s) Average Read Rate (MB/s)
Cruzer in USB 2 port 23.1 22.6
DataTraveler in USB 2 port 33.8 30.3

HP Compaq dc7900 CMT

Average and maximum read rate for a read-write benchmark on the HP desktop
Device and port Maximum Read Rate (MB/s) Average Read Rate (MB/s)
Cruzer in USB 2 port 24.8 24.3
DataTraveler in USB 2 port 40.5 39.4

My conclusion is that the HP desktop has a faster USB 2 controller than the Samsung by 7 MB/s or so, but this is only evident when comparing performance of the Kingston.

Some USB 3.0 benchmarks

After transferring large amounts of data and working with hard drives a lot, it interests me to compare the performance of USB 2.0 and USB 3.0. I have one of each of these ports on my Samsung laptop.

In March 2013, I bought a Kingston DataTraveler 111 8GB, and I wanted to compare it to another flash drive, the SanDisk Cruzer Red 4GB, which I purchased in August 2012. The Kingston is a USB 3.0 flash drive, whereas the Cruzer only supports USB 2.0. The tool I used to compare these two was HD Tune, which is free for read-only benchmarks.

Read benchmarks for USB flash drives
Using the USB 2.0 port Using the USB 3.0 port
SanDisk Cruzer Red Kingston DataTraveler 111 SanDisk Cruzer Red Kingston DataTraveler 111
Transfer Rate: Minimum (MB/sec) 19.0 25.4 20.7 60.4
Transfer Rate: Maximum (MB/sec) 29.7 29.6 29.2 72.2
Transfer Rate: Average (MB/sec) 27.7 26.4 28.3 64.8
Access Time (ms) 0.8 1.0 0.5 0.7

According to Wikipedia’s page on USB, the maximum transfer rate of a USB 2.0 link is 35 MB/s, and we see this port reaching very near that, with maximum transfer rates of 29.6 and 29.7. Without doing multiple trials of any of these experiments, we can see that the Kingston DataTraveler is much faster at reads over a USB 3.0 port than the SanDisk Cruzer on either port. However, the comparative write performance of either of these drives remains to be seen.

Sidenote: My pet peeve about USB ports is that (1) laptop manufacturers place them too close together, and (2) USB flash drive manufacturers make flash drives that take up a large profile. The result is you can only fit one flash drive at a time on the USB ports that have been packed too close together.

A theology of government surveillance (part 1)

As I navigate the modern world, I am presented with a bewildering array of technology options. Not only that, but I find that governments are increasingly interested in recording what I do. Hopefully, for now they will find nothing worth acting on in what they have found. Still, I find it all too easy to fall into fear in the face of the unknown. Who is reading this blog post? What will a government agency do with the information they find in my cell phone text messages?

In the face of this fear, I need to remind myself that God is sovereign. He is seeking his glory by giving grace toward undeserving humans through the death and resurrection of Jesus Christ. As I am a follower of Jesus, I am interested in trusting in him and finding out what the Bible has to say about security.

A Christian view of technology

Other writers have addressed a Christian view of technology. This past year I read (or rather listened to) Tim Challies’ book, The Next Story: Life and Faith after the Digital Explosion. The quantity of information available to us through digital means presents new challenges for those who wish to obey God. Some problems include a redefinition of truth and authority, the distraction brought on by technology, and communication becoming an idol in our lives. The information that technology allows us to so easily store and transmit is not neutral! Rather it has implications for how we live our lives.

God’s attributes

The attributes of God that seem most relevant to our discussion are the “omni” attributes, which come from a prefix meaning all.

  • God is omnipotent. That is, he is able to do all his holy will. This is also called God’s sovereignty.
  • God is omniscient. God fully knows himself and all actual and possible things.
  • God is omnipresent. God has no size or shape and is present in all places with his entire being.
  • God is eternal. God has always existed, having no beginning and no end, and experiencing no succession of moments.

Source: Tim Challies, Visual Theology – The Attributes of God

What is security and privacy?

My brief definition of security is that I want access to my data, and I don’t want others to. My data, or my information, includes files on my computer, digital information about my phone calls, information about my web browsing habits, books that I am interested in, and pictures of me at the beach. I want access to my data with little hassle, that is I don’t want to bother with too many USB drives or too many passwords and complex security measures. But when it comes to others accessing my data, I really only want those I trust to have access to specific things.

The government might want access to some information about me in order to keep me safer. For example, the police might know that my phone number is tied to my address in order to respond to a 911 call. My bank legally needs to know some contact information, because, after all, it is my money they are holding. I willingly provide this information to them when I open an account.

Privacy, secrecy, and confidentiality are related words that also apply to this situation. I’m using these terms loosely as synonyms for security as I’ve defined it above.

What is the role of government?

Let every person be subject to the governing authorities. For there is no authority except from God, and those that exist have been instituted by God.  Therefore whoever resists the authorities resists what God has appointed, and those who resist will incur judgment.  For rulers are not a terror to good conduct, but to bad. Would you have no fear of the one who is in authority? Then do what is good, and you will receive his approval,  for he is God’s servant for your good. But if you do wrong, be afraid, for he does not bear the sword in vain. For he is the servant of God, an avenger who carries out God’s wrath on the wrongdoer.  Therefore one must be in subjection, not only to avoid God’s wrath but also for the sake of conscience.
(Romans 13:1-5 ESV)

After laying out “the depth of the riches and wisdom and knowledge of God” (11:33) in his plan for salvation, Paul turns to moral exhortations. The Christians in Rome are to “be subject to the governing authorities” (verse 1). For them, that meant being subject to a government that was sometimes hostile toward them.

But in a broader sense, this passage from Romans describes a basic duty of government. Government should rule its subjects with justice. In the words of verse 3, government should punish those who do bad and not those who do good. In the Old Testament, God set up a special system of government over his people, the Israelites. He gave them laws and a system for enforcing those laws.

There several ways to connect this with a modern nation like the United States. First, we have a law, that murder is illegal. The system for enforcing that law in my city is the police department. If a dead body is found somewhere, there’s probably going to be a murder investigation. If the police can find out who did it, then this individual will be brought to justice. Law enforcement should be adept at fingerprints, footprints, and all kinds of crime scene evidence in order to catch criminals.

Digital technology creates more possibilities for crime and more ways for law enforcement to catch criminals. For example, the murderer could have revealed his plans in an online chat room a few days before the dead body was found. There are also online crimes, such as phishing and stealing people’s credit card information. Law enforcement should be adept at technology in order to catch these criminals as well.

A sidenote: Isn’t it interesting that we enforce a law against murder mainly by punishing people after they have already committed murder. This is because we can’t predict the future, and we are limited in our ability to prevent people from doing bad things. In Minority Report, the police had the ability to predict when and where and who would commit a murder, but this led to some interesting side effects. God, of course, is omniscient, and because he is eternal, he knows the future.

More to come…

In part 2 I’ll write some thoughts on passages of the Bible about spies, surveillance, and God’s power.

More GnuCash tips

I’m continuing to learn more about GnuCash in order to use it more effectively.

Make the display a little less cluttered by removing the horizontal and vertical lines from the register view. Edit -> Preferences dialog, then the Register tab. Note the two checkboxes, Draw horizontal lines between rows, and Draw vertical lines between columns. Before:

with lines

After:

without lines

Transaction filtering

I’ve found this to be helpful when looking at a reimbursements account. I mark a reimbursement as cleared once I’ve received the money back from the company. Sometimes the reimbursements get cleared out of order because I have submitted them out of order. Then, when I submit my next reimbursement, I use transaction filtering to narrow down the display to just the un-submitted reimbursements.

How to filter transactions: View -> Filter By… Click the Status tab.

My beef with the summary bar

The summary bar appears above the status bar and includes information pertaining to the currently opened tab. On the main accounts page, it shows the grand total of all assets as well as the profit. The profit is calculated by subtracting YTD expenses from YTD income. Therefore, it gives a rough idea of how much money I’ve saved so far this year. However, I find this idea a bit misleading.

For example, it is August 2013. Lets say I will save $100 a month this year, by spending less than I earn each month. This is a monthly profit of $100, so at the end of the year, my profit would show $1200. However, let’s say that since April of 2009, I’ve been saving up to buy a car, and it will cost $5000. At the beginning of 2013, I had $4200 in my accumulation, and now in August, my accumulation fund has reached maturity. I buy the car for $5000. Suddenly the summary bar reports a profit of $-4200, whereas before it said $800. This is a little disconcerting.

In summary (pun intended) the summary bar’s profit calculation is not helpful for personal finance since it doesn’t help you know if you’ve stayed on budget. However, for other Tabs or Pages, such as stock accounts, the summary bar provides useful information, such as the current value of the shares held. So I wish there was an option to disable the profit calculation from showing, but keep the other useful information visible.

Advanced money tracking with GnuCash

In my last post, I wrote a review of GnuCash. Today I’d like to explain some things I’ve learned to track using this financial software.

Reconciling

When I receive a new statement, I first save the PDF to my hard drive. (Hard drive encryption mitigates some of the risk of having all those statements sitting on your hard drive.) Then I reconcile that particular account.

Adjustment account

The adjustment account is an expense account used to keep cash assets accurate. Cash transactions are hard to track, and sometimes my amount of cash on hand does not match the amount recorded in GnuCash. I periodically record this difference as an “Adjustment” expense.

Tax withholding

In the US, taxes get withheld from paychecks throughout the year. This tax withholding can be tracked in GnuCash. Each time you receive a pay check (or pay stub), create a split transaction. The gross wage is entered as income. This income will be split between several assets: some income goes to the tax withholding asset, and some income goes to the checking account (net pay).

When it comes time to pay taxes, the money in your tax withholding asset is used to pay your taxes. The taxes actually paid are an expense. There are two scenarios, and each can be covered by a split transaction:

  1. Your taxes are less than the amount withheld.
  2. Your taxes are more than the amount withheld.

Here’s an example for situation number 1:

tax-withholding

Multiple currencies

Peter Selinger has an excellent discussion of some of the general challenges of multiple currency accounting. The crux of the matter is: Under File-> Properties, go to the Accounts tab, and check “Use Trading Accounts.” This feature doesn’t have a lot of documentation, but it gets the job done.

Reimbursements

When you spend money on a reimbursable expense, you aren’t really spending your own money. You are eventually going to receive that money back, so to you it is an asset. (Not a very liquid asset.) See GnuCash Guide: Chapter 16.

Salary advance

When you receive a salary advance, you receive money you technically haven’t earned yet. This is a liability. You enter the salary advance as a credit to the checking account and a debit to the liability account. When future paychecks come that are reduced (because the company is using them to pay down your salary advance), you can also track this. Enter the paycheck as income, but instead of crediting your checking account, credit the salary advance liability.

Reimbursement advance

A reimbursement advance is money your company gives you to spend for a specific purpose. If you don’t spend it for that purpose, they will eventually need to make you pay that money, e.g. by lowering later paychecks. When you receive a reimbursement advance, you debit that liability and credit your checking account. You continue to record reimbursements by debiting one of your liquid assets and crediting the reimbursement asset. When you submit a reimbursement to clear the advance, you debit the reimbursement asset and credit the reimbursement liability instead of your checking account.

GnuCash: A Review

GnuCash is a tool for tracking your money that works on Windows, Linux, and Mac OS X. GnuCash has powerful features for tracking assets, liabilities, income, and expenses. Using GnuCash has helped me learn some more advanced accounting terms and concepts, such as double-entry accounting. I’m not going to explain those concepts here, as the GnuCash guide does a good job. Be sure to read both the help and the guide.

I plan to use GnuCash for many years to come. As my finances become more complicated, and my assets grow, by God’s grace, I need a tool to help me track my money. I’ve heard of other people tracking their money on spreadsheets, and I realize that if I did that, I would spend too much time trying to tweak the formulas. GnuCash has excellent data entry and reporting, saving me from writing these myself.

I consider GnuCash a compelling alternative to online finance tools, such as Mint, because it keeps my data secure on my personal computer. Of course, this raises its own risks, since there are many ways an adversary could access your data on your own computer. Still, I am more comfortable with these risks then the unknown risks of trusting the cloud.

Advantages of GnuCash

  • Using it will teach accounting concepts.
  • Register entry has powerful autocomplete and keyboard shortcuts.
  • Importing account transactions in QFX format automatically determines whether the data needs to be used to add a new transaction, or to reconcile an existing transaction.
  • The reconciliation window allows you to keep your accounts in sync with bank statements.
  • Included reports give a good overview of income and expenses.

Areas to improve

  • I wish color coding affected the accounts in the account list view, not just the color of their tab. Since I’ve heavily customized my accounts, the account list view can get longer than one screenful. Color coding would help me quickly spot a particular account.

Things still to learn

  • How to use the price editor for multiple currencies in an effective way.

Features I haven’t used

  • Budgets.
  • Recurring transactions. If I enter it manually, it reminds me that I am spending that money.