Reasons Why I Like Google Chrome

I’ve been using Mac OS X since February 2009, and I have been very happy with the adoption.  Nonetheless, when switching to a different operating system, there’s the inevitable transition period — finding, downloading, trying, and settling in with new applications to get the job done.  I was particularly interested in finding a suitable web browser.

On my quest, I went through a number of browsers on the Mac.  At first, I used Safari, but I was not won-over.  I then dabbled with Opera for a little bit, but I just couldn’t stomach the way it rendered many pages.  Having been a Firefox user on Windows, I settled on using Firefox on the Mac for the subsequent 10 months, because it was nearly identical on Mac and Windows.

Now, it should be noted that I have a diverse set of interests, so I tend to have lots of web browser windows open at the same time, and I’ll often have my web browser open for weeks at a time.  And that’s where Firefox began to lose its luster for me.  Firefox on the Mac, like its Windows variant, gets slow, if left running for any length of time.  It eventually consumes a great deal of memory and CPU on the computer, causing everything to get slow.  I have found this to be the case with nearly every web browser I have tried in recent years.  Sure, the problem may have more to do with bad programming in the the JavaScript and Flash elements on the various web pages, but why settle for that?  I wanted a new, smarter, more-efficient web browser!

Having using Google Chrome on Windows (and liking it), I had been anticipating Chrome on Mac for many months.  Finally, on December 8, 2009, my new browser had arrived.  I switched almost exclusively to Google Chrome (beta) on Mac, from that day forward.  Like many other Google offerings, the “beta” product was already feature-rich and very stable.  (Well, I did have to wait a while for  the Bookmark Manager to be implemented on the Mac version, but eventually, it was.)

There are so many good things I can write about Google Chrome:

  • automatic sync of your bookmarks, seamlessly across all your computers running Chrome,
  • the Task Manager’s visibility into memory and CPU consumed by each open web page,
  • each web page runs as its own process, giving you the ability to kill individual pages (or plugins) that aren’t playing nicely, without affecting the other pages,
  • automatic re-opening of previously-open pages, when I re-launch Chrome (after I close it intentionally, or rarely, when it crashes),
  • the design ideas that make it a really great browser, performance-wise and security-wise,
  • its compatibility with all the web sites I use regularly,
  • availability of a large variety of extensions (i.e. plugins),
  • cross-platform support: same browsing experience on Mac and Windows.

It’s a very fast, snappy, and responsive browser.  And (very important to me), it doesn’t appear to suffer from the same performance problems that plague other web browsers, when they have been running for some time.

Apparently, many other people are also taking notice of Google Chrome.  Here’s a recent article that graphs the market share of the most popular web browsers, as of April 2010.  It is remarkable that in just 16 months, Google Chrome has gone from a 2% up to a 7% market share.

Links:

Democrat Votes for Republican Scott Brown

I’m a life-long Democrat who voted for Republican Scott Brown today, in the Massachusetts special election.  Not because I wanted to, but because I had to.  Sadly, I don’t agree with very critical points of Brown’s politics.  On the other hand, I felt it was the only option left for me to send a clear message to the Democratic leadership in Washington.  My emails to my Democratic representatives have gone ignored.

I am still very much in favor of health insurance reform, but I am particularly opposed to the abomination of a bill that came out of the Senate.   As far as I’m concerned, my vote today was intended as a warning shot across the bough.

My message to Washington … Focus on addressing the costs of health care.  I even support a public option.  But I’ll be damned if you continue to insist on an individual mandate.

For me, it is a matter of personal liberty.  How can it be constitutional to require someone to buy health insurance?  It’s one thing to require buying auto insurance if you drive a car.  Quite another thing to require buying health insurance for simply being alive, particularly when the government wants us to buy it from for-profit companies, who are beholden to their shareholders.  Go back to the drawing board.

In the meantime, I want the heads of the the Democratic Senators from Nebraska (Ben Nelson), Louisiana (Mary Landrieu), and Connecticut (Joe Lieberman).  There comes a time when a politician needs to stand up and do the right thing, for the sake of our nation as a whole, and these particular three stand out as notable failures.

Mac OS X … “fork: Resource temporarily unavailable”

Almost a year ago, I made the switch to using Mac OS X as my primary workstation.  As difficult as the transition was during my first 3 weeks, it has now become second nature to me.  I haven’t had any major issues along the way, but now and then, I have had to tweak a thing or two.  Here is the most recent such example.

Lately, I’ve been seeing a fair number of the following error, when launching commands under Bash within a local Terminal session.  It’s rather annoying, because it stops me from getting any work done.  As a systems administrator, I have lots of Terminal sessions open, and this is where the error has always manifested itself.

[laptop:~ root]$ ssh somehost

-bash: fork: Resource temporarily unavailable

The first time this happened to me, I didn’t think much of it, so I rebooted my system.  Today, I did not feel like rebooting my system, because I have a ton of work in progress.  I suspect most people won’t hit this resource limit, but if you’re a power user, you eventually might.

Like other Unix-like operating systems, Max OS X limits the maximum number of processes, system-wide and per-user, but it does so with a rather conservative number.  On my Mac, system-wide processes were limited to 512, and per-user processes were limited to 266.  I’ve never encountered this problem on Linux, because these values are dynamically set in the kernel, based on the amount of memory installed in the Linux system.

Here’s how I resolved this problem.

  • First, determine what your system’s current limits are.  These are the values on my installation of Mac OS X 10.5 with 4 GB of RAM.
[laptop:~ root]$ sysctl -a | grep maxproc | grep =

kern.maxproc = 512
kern.maxprocperuid = 266
  • Now set these to higher values.  I suggest approximately doubling what you already have.
[laptop:~ root]$ sysctl -w kern.maxproc=1024
[laptop:~ root]$ sysctl -w kern.maxprocperuid=512
  • You’ll also want to apply these changes automatically at system bootup.  To do so, add them to the /etc/sysctl.conf file.
[laptop:~ root]$ sudo vi /etc/launchd.conf
[laptop:~ root]$ cat /etc/sysctl.conf

kern.maxproc=1024
kern.maxprocperuid=512
  • At this point, launched processes will still inherit the default maxprocperuid value of 266.  I would like to change this inherited default value for new processes automatically, but I haven’t found a way to increase the default system-wide soft-limit of maxprocperuid on Mac.  On Linux, I simply update the /etc/security/limits.conf file, but I don’t see such a file under Mac OS X.  If you know of a way to do this in Mac OS X, leave a comment below.  For now, I’ve added the following command to my user’s .bash_profile file.  The value of 512 is intended to match that of kern.maxprocperuid shown above.
ulimit -u 512
  • To confirm the change, launch a new Terminal session, and run the following command.  Before the change, you will have seen “266.”  After the change, you should see “512”.
[laptop:~ root]$ ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) 6144
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 256
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 512
virtual memory          (kbytes, -v) unlimited

A commenter posted a link below, referring me to a method of changing the default system-wide values at boot time.  I’ve elaborated in greater detail below.

My system is running a newer version of Mac OS X (10.5.8), and it uses a launchd daemon, which is the parent of all processes (similar to init under Linux).  This launchd daemon can read options from a configuration file, which can be used to set the various “limit” values.  There is both a system-wide and a per-user launchd daemon, and each can be configured independently, although the user’s launchd daemon will inherit its values from the system’s launchd at boot time .  The system-wide daemon values will always limit the maximum values that a per-user daemon can set.

Further, the launchd daemon can be re-configured live (with certain limitations), using the launchctl command, without requiring a reboot.  Though, I suggest that you add your custom settings to /etc/launchd.conf to persist your changes across reboots.

  • First, check your existing user’s launchd settings.  For each setting, there are two values.  A “soft” limit on the left, and a “hard” limit on the right.  The soft limit is the currently active limit.  However, you can increase the soft limit up to (but not greater than) the hard limit.  The root user can increase the hard limits of the system-wide launchd, without a reboot.  However, you cannot change a user’s launchd hard limits without a reboot (even if trying to do so as the root user).
[laptop:~ user]$ launchctl limit

         cpu         unlimited      unlimited
         filesize    unlimited      unlimited
         data        6291456        unlimited
         stack       8388608        67104768
         core        0              unlimited
         rss         unlimited      unlimited
         memlock     unlimited      unlimited
         maxproc     266            532
         maxfiles    256            unlimited
  • Next, check your system-wide setings.  Notice how the user-specific values are identical to the system-wide settings, as they were inherited at boot time.
[laptop:~ user]$ sudo su -
[laptop:~ root]$ launchctl limit

         cpu         unlimited      unlimited
         filesize    unlimited      unlimited
         data        6291456        unlimited
         stack       8388608        67104768
         core        0              unlimited
         rss         unlimited      unlimited
         memlock     unlimited      unlimited
         maxproc     266            532
         maxfiles    256            unlimited

[laptop:~ root]$ exit
  • If you do not need to increase the user-specific values before rebooting, then go on to the next step.  Otherwise, if you need to resolve your immediate “fork: Resource temporarily unavailable” problem, try the following steps.  (You may need to close some applications first.)  Remember, you will not be able to increase the soft values higher than the hard limit imposed by the user’s launchd daemon.  If you try to set the soft limit too high, the value will be reduced to the hard limit value.  As illustrated in the example below, increasing the maxproc soft limit to 512 succeeds, while increasing the maxproc hard limit to 1024 fails.  Run the following commands as the user (not root).
[laptop:~ user]$ launchctl limit maxproc   512 1024
[laptop:~ user]$ launchctl limit maxfiles  512 unlimited
[laptop:~ user]$ launchctl limit

         cpu         unlimited      unlimited
         filesize    unlimited      unlimited
         data        6291456        unlimited
         stack       8388608        67104768
         core        0              unlimited
         rss         unlimited      unlimited
         memlock     unlimited      unlimited
         maxproc     512            532
         maxfiles    512            unlimited
  • Now, place new system-wide default settings into the /etc/launchd.conf file.  You will need to create this file, as it does not exist by default.  This file contains only the options that are passed to launchctl (not the launchctl command itself).  Note that on OS X 10.5.8, the maxproc value has a maximum hard limit of 2500.
[laptop:~ user]$ sudo vi /etc/launchd.conf
[laptop:~ user]$ cat /etc/launchd.conf

limit maxproc 1024 2048
limit maxfiles 1024 unlimited
  • You may also create a configuration file at $HOME/.launchd.conf, which can be used to set the per-user values.  But you need this only if you want smaller default values than what the system allows the user-specific launchd to inherit.

For additional information on launchctl settings, check out the following man pages.

[laptop:~ user]$ man launchd.conf
[laptop:~ user]$ man launchctl
[laptop:~ user]$ man getrlimit

The Berlin Wall, 20 Years Since the Fall

Today, I find myself thinking about the Berlin Wall coming down 20 years ago. I was a senior in high school, and the event felt significant to me. I suppose a number of factors had contributed to the sense of exaltation and relief I had felt at the time.

First, I believe there is an innate understanding that human spirit wants to be free.

Second, some of my early memories about the Wall and the Iron Curtain came during my middle school years. Does anyone else remember watching the film “Night Crossing?” (It was projected in my middle school’s gymnasium one day.) Based on a true story, two East German families built a hot-air balloon so they could escape to West Germany. I was probably 11 years old at the time.

Third, I recall reading stories about East Germans who died in their escape attempts to cross the Wall. It was probably a book I was browsing through in the library, but the haunting photos of death and barbed wire are indelible in my memory. A google search turned up the 1962 story of Peter Fechter, who bled to death at the base of the wall, after being shot by East German guards as he tried to escape.

Additionally, I was a child of the Reagan Cold War era. And the Berlin Wall stood as a symbol of that divide between the U.S. and the Soviet Union. There were countless movies that drew their inspiration from that conflict. Nuclear war was something still on people’s minds; there was a controversial television movie named “The Day After,” which was broadcast in the mid-1980s.

Thinking about the years after the wall came down, I recall my first visit to Germany in 1996. I toured the museum at Checkpoint Charlie. I walked in former East Berlin. I went to a flea market in Mitte, where I saw relics of the cold war for sale: communist-era telephones and radios, etc. I remember seeing bullet holes in the oldest buildings. And I recall all the cranes, and the construction taking place in the East, particularly in the Potsdamer Platz area of the city. When I returned to Germany in 2006, I was impressed with the results of all that construction I had seen 10 years earlier. Twenty years has brought a lot of change.

Anyway, take this moment to remember a day when two halves re-united, when two parts became whole again. Here’s to the celebration of freedom and the persistence of human spirit which yearns to be free.

Affordable Health Insurance For All Americans, Not a Mandate

One of the health insurance proposals circulating in Congress is considering a mandate that all Americans acquire health insurance, without also addressing affordability. Naturally, the “for profit” insurance companies really like this bill. What a disaster that would be!

I’ve written both my representatives in the House and Senate. I am sick and tired of corporations peddling their money and influence on Capitol Hill, particularly the “for profit” health insurance lobby.

If you have an opinion on the matter, then write your congressman and/or woman. The following web pages will help you quickly find the “Contact” link to your representative and senator. My letter is below. Copy and paste, if you like, or write your own.

http://whoismyrepresentative.com/
http://www.congress.org/congressorg/officials/congress/

Subject: Affordable Health Insurance For All Americans, Not a Mandate

Dear ________:

There are a number of proposals circulating in Congress regarding health insurance reform.

One of these bills propose that all Americans be required to have health insurance coverage. Unfortunately, such a mandate, without addressing affordability, is not an acceptable solution!

Private health insurance companies have proven repeatedly that they are beholden to the profit motives of their shareholders, and not to their subscribers. Mandating that all Americans be required to subscribe to private insurance plans only makes the problem terribly worse.

Congress should work on the question of affordability, first and foremost. Quite frankly, if health care coverage were to become affordable, there will be no need to mandate that all Americans have it. Many Americans are uninsured because they (or their employers) cannot afford the coverage available.

I request that you do not vote for any bill that mandates Americans be required to obtain health insurance coverage. Instead, write a bill that makes health insurance affordable and available to all Americans.