Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Saturday, January 11, 2014

Manually Invoking TRIM To Restore SSD Performance

I've had my SSD for almost two years now and although Intel's SSD utility shows it as having plenty of life remaining, I'd been reading up on TRIM and the details of how SSDs manage their space.

TRIM is a kind of garbage collection for SSDs, for although SSDs don't experience data fragmentation of the sort that hard drives do, there is clutter which can accumulate over time and negatively affect performance.

I found a forum post on "refreshing" SSD performance which mentioned a tiny utility called ForceTrim, which tells your SSD to perform TRIM processing and smooth out the "wrinkles" in its data storage.

Using CrystalDiskMark to benchmark my SSD performance before running ForceTrim, I saw performance close to what it was when I first started using this SSD as my operating system drive:

BEFORE - Seems pretty close to new SSD performance.

I then opened ForceTrim, selected my C: drive, and clicked TRIM. As the tool advised, I waited around five minutes for the drive to "recover", then reran the benchmark:

AFTER - Modest gains pretty much across the board.

It does appear that manually invoking TRIM can provide a modest boost in read and write performance for an SSD. Perhaps in the SSD age, forcing TRIM once in a while is the "new" defrag?

Wednesday, May 30, 2012

Firefox Performance Problems

Lately I've noticed Firefox seems to be lagging as of the latest release of version 12. 

Since my earlier post regarding setting Firefox up to utilize CPU affinity in Windows, things have been manageable, but lately a familiar flavor of failure seems to have crept back into this latest release.

If I leave Firefox open and running overnight with my usual group of a dozen or so tabs open, as soon as I resume activity in the morning, I notice in Task Manager that Firefox has one of my system's CPU cores at 100% usage, and has well over 1.7 GB of system memory in use, far more than what typically ranges from 400 to 700 MB on an average day.

Any given morning, thanks to Firefox.

More often than not, once I clear this CPU usage spike by ending the firefox.exe process, when I reopen Firefox I'm greeted with tabs notifying me of add-on updates that have been applied. 

This same issue seemed to be absent as of, say, version 10, but appears to have recently reemerged, at least in my experience on several different PCs running Windows 7.

A common thread among established users on the Firefox support forum points to the various add-ons users have installed. Clearly, many of them say, this is the culprit, and the often the user is advised to open Firefox sans add-ons and attempt to reproduce the problem by enabling add-ons one by one and testing after each to determine which might be the culprit.

I have no desire to invest the time and effort in something that I think developers and analysts at Mozilla should be hammering out themselves. It seems that if you release a platform on which users will develop add-ons, there should be safeguards in place to prevent poor coding from disrupting the integrity of the browser's functionality.

That being said, if you have a 64-bit system, consider trying out Waterfox, a Firefox build which emphasizes performance and speed, and mitigates a lot of whatever lurks in Firefox's codebase that might be causing this excessive memory usage and lag.

Perhaps it's some insidious conspiracy to make it so that when your computer is otherwise asleep at night, Firefox will rear its head and ramp up CPU usage and therefore power consumption, making an impact, however small, on world oil prices, driving up costs and compelling people to bite the bullet and get off the grid with their own solar, wind, nuclear, or other alternative power source.

I've had crazier ideas!

Tuesday, March 22, 2011

Process Lasso

I recently installed Process Lasso, a process management and optimization utility. 

Thus far it seems to be a highly effective and versatile tool for managing CPU. Using a proprietary algorithm dubbed ProBalance™, It strives to maximize your computer's responsiveness in spite of the demands placed upon the CPU by myriad running processes. Runaway processes that might ordinarily eat 99% or more CPU can be dynamically adjusted by Process Lasso so that lag is minimized.

Particularly useful is the ability to tag running processes in the GUI and assign them properties in the context menu, including process priority (to determine how valuable a process is and how much time the CPU devotes to it),  processor affinity (assigning the use of one or more CPU cores in a multi-core processor to a given process), gaming mode (favors a process when it's running so that the CPU dedicated to its function is maximized), and terminate always (very handy if malware with a specific filename keeps trying to execute and hang out in memory), as well as lots of other options that extend Windows' built-in Task Manager by leaps and bounds.

One example of Process Lasso's usefulness arose when I noticed today that a particular process was very frequently being restrained by Process Lasso for trying to monopolize CPU. According to this note about the graph portion of the GUI, bars in red denote CPU spikes, and if you hover over these, the process name is displayed (in this case, a process called smc.exe, or Symantec Mangement Client, part of Symantec Antivirus).

This particular process had, in the few weeks I've had Process Lasso installed, been restrained over 900 times, and each of the red vertical bars above denoting CPU spikes revealed smc.exe as the culprit.

I decided to right-click on the smc.exe entry from the list and modify its Default Priority Class from its previous Below Normal setting to Idle. At this point I'm unclear about whether I may be compromising Process Lasso's ability to do its job by dictating to it how to treat a particular process on my system; much of the documentation recommends allowing the ProBalance algorithm to do it's thing. 

However, given that I've already configured Symantec Antivirus to exclude from scanning the applications and folders which I most commonly use, I'm hoping that this step will restrict it from eating more CPU than it should; the graph after the change, at least, seems to indicate that Process Lasso is not having to restrain smc.exe nearly as much as before.

In general, seeing red can incite violence in human beings as well as bulls, so at least for my purposes, as far as Process Lasso is concerned, less red is a favorable outcome.

Thursday, March 17, 2011

Dell Latitude E6410: SpeedStep, or SpeedSTOMP?

Recently on the Dell Latitude E6410 I use at the office, on several occasions Windows 7 would slow down and become completely unusable, necessitating a hard reboot.

Event Viewer revealed the following events in succession for each core of my laptop's quad core Intel i5 CPU:

The speed of processor 0 in group 0 is being limited by system firmware. The processor has been in this reduced performance state for 5 seconds since the last report.

Windows slowed down to the extent that I couldn't even open Task Manager, which normally comes up readily even if the system is otherwise sluggish. Interestingly, in this state it would enter Sleep Mode eventually upon closing the lid, but was otherwise unusable.

Several steps can avoid these slowdowns:
  • In your system BIOS, disable Intel SpeedStep.
  • In Windows 7, ensure your system uses the High Performance setting for Power Plan.
  • Ensure adequate cooling with a utility like SpeedFan to monitor temperatures.

However, based on at least one thread in the Dell support forum and another on a hardware forum, this could turn out to be an indication of a hardware problem.

Intel SpeedStep is triggered to activate, among other things, by heat. If the system is heating up and can't dissipate heat effectively, SpeedStep by default will engage and step down the CPU so that it generates less heat. Whether that heat is generated by the CPU itself as a result of a dead heatsink fan or the heatsink somehow being detached from the CPU surface, or the GPU overheating for whatever reason, or heat simply can't dissipate due to factors like lack of ventilation thanks to dust or covered vents, it will try to compensate by throttling down the CPU speed.

While this seems perfectly reasonable in theory, in practice it seems to not work as intended, at least in the case of my E6410. I've read reports in the very helpful Dell Latitude E6410 Owner's Thread that some have had similar issues which necessitated a mainboard replacement, while others were able to get up and running by just clearing dust out from the vents of their laptop. 

My particular situation, however, doesn't seem that common, which makes me wonder whether my GPU might be on its way out. Yesterday with the laptop on battery and without a lot of ambient noise, I noticed that when I would ALT-TAB from say a mostly white background to a vividly colorful one, a distinct whine would be emitted from my system, and the display wavered just slightly as if some interference were rippling across the video hardware (update on this, according to some info in this thread, this whine is characteristic of systems with Intel Core 2 Duo and newer CPUs).

For now, I've disabled SpeedStep and installed SpeedFan to keep an eye on temperatures, and cleaned out dust. Hopefully this will do the trick, but if not, given this and the sound problems which continue to plague my E6410, a warranty comes in handy. I added a link to my bookmark toolbar to the aforementioned E6410 owner's thread, it seems Firefox sympathizes with my plight based on how it shortened the bookmark title. Ow indeed, Dell!

Thursday, January 27, 2011

Improve Firefox Performance with Processor Affinity

Firefox seems to frequently stutter or lag while doing seemingly trivial tasks like scrolling or even typing following the most recent Firefox 3 update.
Enter the concept of processor affinity, which enables you to direct applications to utilize one or more specific CPU cores in your multicore system. I discovered a blog post where the author describes creating a shortcut in Windows Vista or Windows 7 which will execute a given application with a specific processor affinity configuration.


  1. Copy and paste to create a copy of your current shortcut to Firefox on the Desktop.
  1. Pick a single CPU core, in decimal, to dedicate to Firefox, according to the chart below. I chose CPU 3 on my quad-core system.
0001 = 1 (CPU 0)
0010 = 2 (CPU 1)
0100 = 4 (CPU 2)
1000 = 8 (CPU 3)

  1. In the Target box, copy and paste one of the following lines (the first for 32-bit Windows, the second for 64-bit), and change x to match the value you chose in the above step (change the paths as necessary if your Firefox lives in a different location).
C:\Windows\System32\cmd.exe /c start "C:\Program Files\Mozilla Firefox\" /affinity x firefox.exe

C:\Windows\System32\cmd.exe /c start "C:\Program Files (x86)\Mozilla Firefox\" /affinity x firefox.exe

  1. Click OK to accept the changes, then close and reopen Firefox using the modified shortcut.

Windows XP also allows for changing the processor affinity setting for a given process via the Processes tab in Task Manager, but this setting is applied only for that instance of the application, so you can't use the above method to have a shortcut which automatically sets the affinity every time. If you try it, you'll get this error message:

Invalid switch - "/affinity"

Fortunately, a freeware utility called RunFirst exists which will perform in a similar manner, except it will by default assign only the first CPU core in the system to have affinity with the application you're running it with. To use it, create a batch file to execute firefox.exe like this:
      RunFirst.EXE "C:\Program Files\Mozilla Firefox\firefox.exe"

Now, Firefox has its very own CPU core to use on my Windows 7 system, which is advantageous in that the other applications running on my system need only contend with one core being potentially monopolized by some CPU-expensive operations which Firefox initiates.

I tend to browse with many (read: dozens) of tabs open simultaneously, as well as a plethora of add-ons installed such as AdBlock Plus, DownThemAll, FireBug, GreaseMonkey, FoxyTunes, Stylish, FiddlerSwitch, and more. Mine is hardly a “vanilla” setup, and given that these various add-ons let alone Firefox itself are developed by a variety of developers with a variety of coding styles, even bugs, it’s entirely likely that I’m a victim of chaos, that an unfortunate confluence of events are conspiring to kick my browsing experience in the teeth. 

At least this way, I'm letting Firefox do it's thing on just a single core, rather than having it bleed over onto the others and potentially making my other running processes unhappy.

So far, Firefox seems to be significantly more responsive than before!