Macintosh memory management

mac-memory

This is a nerd post. Sorry, non-nerds…

I have been using Macintoshes since the 1980s. The Macintosh operating system has gone through many changes in that time, and it’s one of the best computer operating systems in existence. Though my favorite all-time operating system was Solaris, the version of Unix produced by Sun Microsystems. A few months ago, Apple released version 10.9 of the Mac OS X operating system, also known as Mavericks. I like Mavericks (not least because it was free).

If you turn your computer on and off every day, memory management is of little concern to you. However, if you leave your computer running all the time, as I do, and especially if you have an older computer without the abundance of memory in newer computers, then memory management matters.

One of the wonderful things about the Macintosh OS X operating system is that it is extremely stable. A Mac can be left running for months without needing a reboot. I’ve seen Solaris computers run for more than a year without needing a reboot. But stability is one thing, and memory management is another.

The issue is probably a new concept for non-nerds: memory leaks. Applications frequently contain memory leaks. Memory leaks are generally caused by lazy programming. Programs request memory from the operating system for temporary use, and with many programming languages it is the responsibility of the programmer to release this memory when it is no longer needed. That often fails to happen. Memory leaks pile on top of memory leaks, and soon your computer starts to get low on RAM. When this happens on a Macintosh, you may see the spinning beach ball icon while the operating system comes up with the requested memory. When the computer’s physical memory (or RAM) is exhausted, the computer will resort to “swap” memory — using disk space (which is much slower than RAM) to temporarily store the contents of RAM to disk, then paging the contents back and forth from disk to RAM as needed by the running program. This ability to swap is a sophisticated function of good operating systems that has been around since at least the 1990s. It’s better than simply running out of RAM (which is what used to happen). But swapping is slow. You may have to wait, which is what the spinning beach ball is all about.

Apple’s OS X Mavericks made some significant changes in memory management. The concept is that unused RAM is wasted. So OS X uses almost all of the computer’s RAM all of the time. This can be misleading, because the computer may appear to be more memory-starved than it really is.

But here’s the problem. Applications leak memory, and that’s not the operating system’s fault. When an application leaks memory, the memory can be recovered only by stopping and restarting the application. Here’s a for-example.

For security reasons, to prevent tracking by snoopers like Facebook and Google, I always have two browsers running. In one browser (Safari), I run Facebook and Google applications such as Google analytics. In Safari, that’s ALL I do. It doesn’t matter if Facebook and Google track me, because I don’t go anywhere else in that browser. I do all my real browsing in Chrome, using multiple tabs in an Incognito window, which does not save cookies.

As Chrome and Safari continue to run, often for days, they leak memory. This may or may not be a problem caused by the browser itself. Most web pages these days use some sort of god-awful programming language such as Javascript, so the filthy rotten programming on the web pages hogs memory, then leaks it. So, if you leave a browser running for a long time, your computer’s memory gets leaked, or wasted, and the computer’s operating system must jump through hoops and bend over backwards to keep shoveling RAM to the browser. Facebook’s programming is a horrible memory leaker. I often leave Facebook running, but I close the Facebook page and reopen it occasionally to release the memory it’s wasting. (The people at Facebook are lousy programmers.)

So what’s the bottom line for Mac users, especially for you non-nerds? First, upgrade to Mavericks if you haven’t already. Second, if you see a spinning beach ball, consider quitting from open applications and restarting the applications you need. It’s not really necessary to reboot the computer.

For nerds, you can monitor your computer’s memory usage with Activity Monitor. It is possible to “clean” a Mac’s memory and force all the garbage out of RAM. You probably don’t want to, though, because in doing so you’ll also defeat some of the clever methods Mac OS X uses to optimize the use of available physical RAM. But if you know what you’re doing, a little app named Memory Clean will do this for you, while also continuously displaying in the menu bar the amount of free RAM available. You also can clear the Mac’s memory in a terminal window by typing “sudo purge.” The purge command, which comes with the Mac, will do the same thing. In Activity Monitor, watch the “memory pressure” window. If it’s anything but all green, consider taking action to get it back in the green by closing applications and reopening them as needed.

My iMac is now six years old. One of these years I’ll replace it. But for now I have to live with 4 gigabytes of RAM, which is the maximum my older iMac can take.

And if you see a spinning beach ball, it’s not your Mac’s fault. It’s just that your Mac is trying heroically to deal with the crimes of lousy programmers.

Banana-walnut broiler cakes

A-banana-muck-1

The abbey is rich with eggs, so eggs are the default breakfast. But variation is needed. The French divide breakfasts into two broad categories — sweet breakfasts and salty breakfasts. Sweet breakfasts are awfully good sometimes, but it’s hard to keep sweet breakfasts from being cloying. Or they’re just too high carb, and one starts craving a high-carb lunch.

These banana-walnut broiler cakes are not exactly low carb, but they’re not as high carb as they look. Each cake contains only about 4 ounces of batter. The rest of it is banana and toasted walnuts.

Here’s a rough recipe.

1. Toast a generous quantity of walnuts in a skillet and set them aside.

2. Make a portion of your favorite pancake batter, but not too much. The cake in the photo was made with blue cornmeal batter.

3. Slice a banana into quarters and start browning the slices in a skillet. Use an interesting oil such as coconut oil.

4. When the bananas start to brown, throw on the toasted walnuts.

5. Pour on the batter.

6. When the bottom of the cake is nicely browned, pop the pan under the broiler.

7. Brown the top of the cake under the broiler. When it’s done, flip it onto a plate. The side that was browned in the skillet on the stovetop will be the prettiest side, so turn that up. The cake will fall apart, but that’s a feature, not a bug.

8. If you’re making more than one, keep them warm on the bottom rack of the oven, away from the broiler.

9. Serve ’em with butter and maple syrup.

These hotcakes are delicious, with a complex blend of flavors and textures. The toasted walnuts give it a roasted flavor. Browned bananas are divine. The coconut oil really brings out the walnut and banana flavors. And how can you go wrong with maple syrup?

By the way, Trader Joe’s has good bargains in Canadian maple syrup. I buy Grade B syrup. Grade B is not inferior. It’s just a little heavier and has a sassier taste than Grade A. And it’s cheaper.

Two new chickens

A-new-girls
They’re sleeping.

We picked up two new chickens today at the mill in Walnut Cove. They’re both Golden Comets.

Luckily, we’ve not lost any hens in the last year, so we figured that two new hens would suffice for 2014. Counting the two new girls, there are now eight chickens at the abbey. We got Golden Comets because of their sweet personalities and the fact that they’re efficient layers.

As usual, they will live in a big bird cage in the bay window until they’re old enough to go out to the chicken house and hold their own with the big chickens.

About those $10 eggs

pricey-eggs-1

Last week, Ken told me that he saw eggs at Whole Foods that cost more than $10 a dozen. I just had to see that for myself, so today I looked for them in the egg section. The most expensive eggs I saw were $7.99 a dozen. But, luckily, Whole Foods’ egg guy was there refilling the shelves, and I got to ask him some questions.

Yes indeed, he said. Last week they had eggs that cost more than $10 a dozen. But they already had sold out! I asked him what it was about the eggs that justified the price. He called this the “resume” of the eggs. The $10 eggs, he said, were (if I and he understood correctly) from grass-fed hens. Both he and I found that a bit strange. Grass-fed cows are a good thing, because cows are ruminants, and grass is their natural food. It’s different with chickens, though. Chickens do love grass, but it’s not something that they want to live on exclusively. From my reading on chicken husbandry, I understand that chickens will happily derive about a third of their calories from grass. But they also want seeds and any tasty worms, grubs, or insects that they can find. Not to mention kitchen scraps. So I’m skeptical about the concept of grass-fed chickens.

Today, the most expensive eggs at Whole Foods were the $7.99 eggs, and I understood that the $7.99 eggs came from the same North Carolina farm (in Durham) that the $10 eggs came from.

But this is amazing. People will pay more than $10 a dozen for eggs! Ken and I really wanted to sample those eggs, because we both believe that they couldn’t possibly be superior to the eggs laid by Acorn Abbey’s happy pastured hens. But that test will have to wait. So far, the Whole Foods guy said, they have not been able to get more of the $10 eggs, though they’re trying.

Ken keeps a spreadsheet that he calls “Abbey economics,” and in the spreadsheet he tracks the cost of keeping our hens vs. the value of the eggs. One thing is for sure. The abbey’s economics look a whole lot better if you value our amazing eggs at $10 a dozen. At that price, we’re probably saving money by having our own hens.

pricey-eggs-2

Feeding the worms

worms-1
The garden plot with compost freshly tilled in … and the chickens working it

Increasingly we think less in terms of fertilizing plants and more in terms of feeding the worms, on the grounds that if your worms are abundant and well fed, the plant life will flourish.

Part of this process is compost. The only form of compost easily available here at reasonable prices is leaf compost. This is a high-carbon compost and needs time to digest into the soil. But it’s good worm food if applied at the right time. Now is the right time. The soil is starting to warm up, and we’re a few weeks away from spring planting. Rain is forecast for Sunday. So Ken rushed to get several tons of compost spread around ahead of the rain. Then he tilled it into the soil. Given two or three weeks, a little rain, and a little warm sun, the compost will decompose into the soil before the spring planting.

My understanding is that high-carbon compost like leaf compost must be digested by bacteria before its nutrition is available to plants. While the bacteria are doing this work, they suck up a lot of nitrogen from the soil. Then the bacteria die, releasing the nitrogen back to the soil and making the nitrogen available for plants.

We also applied about 400 pounds of organic fertilizer this year. The fertilizer is made from chicken manure. But in addition to that, we use soybean meal (about 600 pounds this year) as fertilizer. The soybean meal has a decent portion of nitrogen, and it’s good worm food.

Each year, we add organic fertilizers and humus to the soil. And, each year, the plant life gets more lush and the birds and wildlife more exuberant.

worms-2
Piles of compost ready to be tilled into the wildflower patches. The wildflower patches look nice, and the seeds the flowers produce attract birds.

Culture for lunch: $5.99

A-cafeteria-1

If Southerners still ate traditional Southern cuisine cooked at home, the statistics on our health wouldn’t be what they are. You only have to look at what people have in their carts at the grocery store to see that almost nobody cooks from scratch anymore. I have a lot of doubts about whether young people really learn to cook at all anymore. Often on Facebook I see pictures of dishes that I suspect pass for home cooking these days — concoctions of grated cheese, sausage, and biscuit mix, for example.

In this area, one of our cultural resources is the K&W Cafeteria, a regional chain that started in Winston-Salem in the 1930s, I believe. It’s been over 40 years since I first ate at a K&W, and almost nothing has changed. They do Southern cuisine pretty much from scratch, striking a pretty good balance between honesty of the cuisine and the low prices that people expect around here.

Many people look down on the K&W and wouldn’t want to be seen there. I am not among them. As a matter of fact, I’m a reverse snob when it comes to the K&W. When I have visitors from out of town (with the occasional exception of Californians), I almost always take them to the K&W to help acquaint them with traditional Southern cuisine. It was the favorite eating place of a friend from Europe (who made fun of restaurants that are considered fancy in these parts). And even those who look down on places popular with seniors and people of modest means have to grant that, at least, the K&W is not fast food.

Recently they started having lunch specials. One of those specials is four vegetables, plus bread and a drink, for $5.99. Today for lunch I had pinto beans (with onions), mashed potatoes, green beans, broccoli, corn bread and iced tea. How could you go wrong?

A-cafeteria-2

New gate for the new chicken lot

A-new-gate-1

As of sunset today, the chickens’ new habitat is ready. They now have three grazing and scratching areas, each separated by gates: the garden, the orchard, and a section of woods. Six chickens can do a great deal of damage to grass, and we want the strongest possible turf in the orchard. When it became apparent by mid-winter that the turf in the orchard was not going to be able to withstand a full winter of scratching, we moved the chickens into the garden to protect the orchard turf. The chickens soon wiped out the winter rye that had been planted as a cover crop for the garden and made a big mess. But at least, in the garden, no permanent harm was done.

Ken made the decision to extend their scratching area into the woods. That will give the chickens a great deal more space and relieve the pressure on the orchard turf. It also will provide a cool, shady area for the girls to hang out during the heat of summer. It also will make it easier to justify two or three new hens this spring.

This project cost several hundred dollars and a lot of time, but after we saw eggs for more than $10 a dozen at Whole Foods, we had no doubt that it was worth it.

B-new-gate-2
The girls in the garden — now a muddy mess after lots of rain and snow and scratching

Birds, everywhere

vireo
Who can identify this bird? Photo by Ken Ilgunas. Update: We think this bird is a pine warbler.

It’s amazing how many birds there are around the abbey right now. Partly, no doubt, it’s because we’ve been feeding them. Partly, no doubt, it’s because it’s spring. But the birds are not just near the feeders. They’re everywhere — in the trees, on the fences, working the orchard, raiding the chicken house, waiting in line for the feeding stations on the porches.

We would like to think that, each year, the abbey grounds are becoming better habitat for birds. Each year, we dump more compost and more organic fertilizer pretty much everywhere. We’ve planted more evergreens for cover and lots of wildflowers. Where there is food and water and shelter, the birds will come.