The Computer Performance Shell Game

of course for gamers you have to worry about Bottleneck number 5 (GPU) as well.

That’s a pretty easy one to detect, though. Do you still have all your arms and legs? If yes then you didn’t spend enough on a GPU :stuck_out_tongue:

Um, isn’t perfmon in XP pro and windows 2003 as well?

One thing we need is a smarter Task Scheduler. Not a lot smarter, but enough to monitor resource consumption levels and sequence jobs based on system-wide thresholds and queues allowing at least hi/low prioritization of jobs. Start time alone is not enough.

There are lots of tasks that can stand to be batch processed, and this is something that can be used to better exploit multi-core/CPU systems.

Working against system-busy level setpoints such work could be done by serializing tasks while allowing parallel processing based on resource availability. Those setpoints could also be used to avoid starving interactive processes and those directly serving near-realtime needs (such as web servers, etc.), suspending batch processes as need be.

Sort of reinventing mainframe-style scheduling.

I think this video (http://www.youtube.com/watch?v=96dWOEa4Djsfmt=22) shows how to eliminate my disk problems :slight_smile:

You guys should see some of the cool performance monitoring tools on linux and BSD/OS X.

Dang. Now I wonder if Apple borrowed the idea from Microsoft - after all, the task manager in OS X is called Activity Monitor and not at all iBusy, iWhatsRunning, or even FindAHog Pro.

Windows 7’s resource monitor really improves on Vista’s, it is much prettier.

http://i42.tinypic.com/657j2x.png

Yeah, but does it have the minimizing/maximizing/close buttons on the LEFT? No, I don’t think so. I’ll wait for Windows 8.

Jeff, Drug analogies? Really? What’s next, are you smoking crack? You can do better than that…

Another bottleneck, one I’m not surprised you missed out on given how dismissive you have been of quad cores, is synchronization overhead when trying to achieve parallelism.

Thread-switching overhead can show up as excessive kernel time when you know there shouldn’t be excessive time spent in the kernel (e.g. in device I/O, low-level encryption, etc), while blocking overhead shows up as low CPU usage even though there’s plenty of work to do and no excessive strain on memory or I/O.

imissmyjuno: But Activity Monitor shows you your computer’s activity (so I’d say the name works). And it’s really just a nice GUI for other tools (like ‘top’). In fact, nothing that’s core in OS X is i-Anything. The add-on tools (iWork, iLife, iDisk etc) have the i-name scheme. OS X is pretty i-Void when you get down to it.

Following a previous comment by DAVE, if you live over in the *nix side of the world, we have a cornucopia of performance and monitoring tools at our disposal: sar, uptime, vmstat, swapon, ps, performance analysis script (by redhat), top, dstat, /proc/interrupts, iostat, /proc/meminfo, /proc/slabinfo, date, ntop, unixbench, iozone, bc, and HP’s collectl.

Using any combination of these tools, I think one could easily fall into analysis paralysis, if one was so inclined. Surely no one around here is obsessed with gigantic data sets…

There’s an additional factor beyond bytes-per-second to consider when monitoring disk performance, and this is where average response time comes in to play.

Consider two systems, one is showing 600 Mbytes read per minute, and the other showing only 60.

At a glance one might assume the system pulling 600 Mb/min is under more disk strain, but what if those 600 Mb/min are coming sequentially of the disk? Any disk you’ll find can easily stream 10 Mb/sec sequential without a blink. This system might not be under disk load at all.

Now the system pulling 60 Mb/min (or 1 Mb/s) on the other hand could be thrashing insanely across the platter trying to service a heavy random load, and working as hard as it possibly can.

This is where response time comes in to play. Of course there are (always) other factors involved, but with server type workloads an overloaded disk subsystem will tend to show higher IO response times, even while suffering lower total throughput.

@imissmyjuno WindowBlinds. http://gekos.deviantart.com/art/Leopard-WindowBlinds-114252416

Now use a real computer

What about the load average?

A system with low cpu, network or disk usage can have an high load average in any of these three aspects if understimated and so can have poor performance while appearing free of duty.

Lack of morning coffee is my biggest performance bottleneck…

This is all well and good for a closed source system where the solution to a bottleneck is to upgrade the offending hardware (or maybe if you’re lucky you can play with some configuration item).

But I want to emphasize that if you are developing the code in question, there are much more effective tools for profiling your code directly. This will find the specific system calls which are at fault, so that hopefully you can optimize your code better…

Three cheers for gkrellm, which I’ve been using on Linux for years now. Without it, I feel naked because I don’t know what my computer’s doing.

As for a smarter task scheduler: There’s one simple thing that could help a lot: Replace the current priority system with one that’s more informative.

Tasks can indicate what sort of CPU priority they should get but that’s it. That’s useless for a background task that uses lots of disk activity.

How about making priorities: (System), Realtime, Interactive, Batch, Background.

These would apply to ALL activities by the thread, not just CPU time. The System one would be special, only the OS could use it and it’s only used for things that need to be able to interrupt high priority tasks. (Example: The task manager–otherwise you would have no way of killing a realtime task that went wild.)

Tasks of higher priority execute before tasks of lower priority even if that means starving them. Unlike the current system it would apply to more than just the CPU. When a program does something that initiates disk activity that activity gets tagged with the priority of the task.

Thus you could kick off large disk-intensive tasks at low priority without making a dog of your system.

Don’t discount Internet connection speed as a bottleneck either.

While your processor operates at a rate of billions of instructions per second, typical Internet rates are in the low millions, roughly around 10,000X slower.

The hard time I am having with all of this progress is that my old 1982 CP/M floppy based Osborne computer is able to bootstrap its OS and load Wordstar and my document in under 15 seconds and with all of the modern wonderful advances we are not able to get anywhere close to that…