Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Thursday, March 1, 2012

Windows 7: Assigning Process Priorities to Prevent Slowdowns

I had some programs that slowed down my system to the point that I could barely get any work done.  Examples included Beyond Compare (sometimes) and GoodSync (often).  These programs were not usually urgent; I would have been happy with letting them run at a slower pace, so that I could continue to use the machine in a more or less normal way.  This post describes my search for tools that would give me some control over the demands that those programs would place on my system.

The existing tool for this purpose, Windows Task Manager (available via Ctrl-Alt-Del > Start Task Manager, or via Start > Run > taskmgr.exe), would give me information about various processes.  Many other programs -- including various gadgets and other sorts of monitoring tools -- offered that.  A search led to Process Explorer and System Explorer Portable, which CNET and Softpedia portrayed as popular, highly rated replacements for Task Manager.  For basic system resource information, I was presently using (and liked) Moo0 SystemMonitor, and wasn't too interested in adding more of that right now.

What I was more interested in was actual control of processes.  Evidently it was possible to adjust process priorities manually in Task Manager, and perhaps in Process Explorer and/or System Explorer Portable; but it seemed that this would work only as long as processes were running. In other words, it seemed that the Task Manager manual setting would have to be recreated every time a program was shut down and restarted.

Further investigation led to utilities that would apparently allow me not only to adjust priorities, but to have my adjustments be remembered.  Programs I encountered at this point included Prio, Process Lasso, IO Priority, and Process Hacker. Softpedia searches indicated that Project Lasso was commercial, and had nothing for IO Priority.  I had seen a few very positive comments about Prio, so perhaps it was up and coming; but it was not a major player at either Softpedia or CNET. Those two sources also disagreed as to whether I was getting a free or trial version.  On both CNET and Softpedia, Process Hacker seemed to be the leading tool for process adjustment.

The CNET download gave me both .bin and .exe versions of Process Hacker.  I was more interested in a portable version, so I unzipped the .bin and drilled down to the appropriate .exe and ran that.  It gave me a colorful, hierarchical indication of running processes.

I decided to put it to a test.  I ran GoodSync and did a Ctrl-F in Process Hacker.  That gave me a separate list of files, processes, and threads that apparently involved GoodSync.  But where was GoodSync within the pretty list of colored processes, there in the main Process Hacker window?  I clicked on the Description heading, and that gave me an alphabetical list.  Ah, there it was.  GoodSync was currently using up to 3%, no, 5%, no, make that 10% of CPU resources.  The number kept rising.  In the amount of time it took me to write these words, it was up to 25%.  I had a quad core processor; maybe 25% was going to be the limit.  I clicked to sort on the CPU heading.  At first, GoodSync was solidly in second place as the greatest consumer of CPU resources, behind System Idle Processes.  It seemed that the latter just meant that I had a lot of idle capacity.  That seemed to be the message from Moo0 too:  the CPU was not very busy.

Process Hacker also said that GoodSync was using a steady 468MB in Private Bytes.  A StackOverflow post said that private bytes was "the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes."  Another post in that thread clarified:  this value included pagefile (i.e., virtual) memory.  So it didn't necessarily mean that GoodSync was using almost a half-gig of what the RAM chips in my computer could offer.  The thread seemed to say that the most important value of that number was in whether it was growing, which would indicate a memory leak -- which apparently meant that the program in question kept asking for more and more memory, without reusing or returning what it had already requested and was no longer using.  This didn't seem to be a problem:  the Private Bytes number for GoodSync had not yet risen beyond about 480MB.

I clicked on the I/O Total Rate heading in Process Hacker.  It put GoodSync by far at the top of the list, using 22 mB/s (with variations), when the next most disk-intensive programs were generally asking for less than 20 kB/s.  This concurred with Moo0 -- it was tending to show GoodSync as the chief loader of the hard drive -- but this was giving me much more information about how GoodSync compared to the other programs running.  (I was working in the Processes tab in Process Hacker.  There were also Services and Network tabs.)  I also noticed, by this point, that the Private Bytes number did seem to be creeping upwards, now reaching 520MB.  I wondered where it would be in an hour or two.

So now, could I put the brakes on GoodSync?  I right-clicked on it, there in Process Hacker, and saw at least three relevant options:  Terminate, Suspend, and Priority.  Of these, the only one that would put on the brakes without completely ending progress was Priority.  That one was familiar; I had seen the same options elsewhere, probably in Task Manager.  The options were Real Time, High, Above Normal, Normal, Below Normal, and Idle.  Normal was the default.  I had seen somewhere that Normal was the default for everything in Windows.

So, sad to say, this thing wasn't going to give me fine-tuned tweaking options, like "40% of Normal" or "Run only when computer is idle" or "Try to finish this process by tomorrow morning."  I realized that not all of these possibilities might be feasible in Windows 7.  And, wow, what about RAM?  GoodSync was up to 905MB of Private Bytes now.  For that matter, Internet Explorer (where I was writing this) was at 870MB (with eight tabs open, and after 50 hours of uptime, according to Moo0).  I was using RizoneSoft MemoryBooster to keep RAM available, but it didn't have options to put restrictions on individual programs, and hitting its Optimize Memory button at this point didn't have any effect upon the Private Bytes reported by Process Hacker for GoodSync and IE.  I guessed that the situation was that memory leaks couldn't be squeezed much -- that you might basically have a choice between letting the program run or shutting it down so that memory could clear.

I dimly recalled that GoodSync might have its own internal option to throttle itself.  A look at this point reminded me:  its Auto > General tab would allow a specific sync job to slow down file copying if the average download speed exceeded a certain value.  I wasn't quite sure how that would work, but I didn't think the problem was with the speed of downloads (i.e., how quickly they would travel across the ethernet cable between computers).  What seemed most demanding about GoodSync was its use of system resources to do its calculations of what needed to be copied.  In other words, I didn't care whether it was slowing me down because of calculations, or downloads, or for some other reason; I just cared that, overall, it was slowing me down.  And at this point I was not seeing anything specifically geared toward that.  And even if I had, I'd still have a similar concern for some other programs.

Further exploration in Process Hacker indicated that I had overlooked another possible location of options.  I right-clicked on the Process Hacker line for GoodSync and chose Miscellanous.  There, I saw at least three intriguing options:  I/O Priority, Page Priority, and Reduce Working Set.  I decided to see what would happen if I changed a bunch of settings to their minimum values.  So I changed GoodSync right-click Priority from Normal to Below Normal.  I didn't see any difference, there, between Below Normal and Real Time (the highest setting).  On, then, to Miscellaneous > I/O Priority.  It was set to Normal; I set it to Very Low.  Still no obvious difference in the demands on CPU, I/O, or Private Bytes shown in Process Hacker.  Next, Miscellaneous > Page Priority.  It was at 5 (the highest possible value); I set it to 1.  Finally, Miscellaneous > Reduce Working Set.  It was just an on-or-off option.  I turned it on.  No visible difference in the numbers.  I decided to turn off Reduce Working Set, putting it back to its default setting, since I didn't know what it was.  Seems I was wrong:  it wasn't a checked, toggling option; evidently I was just reducing the working set further (whatever that meant) every time I hit it.

Well, by this point, as a correction to my impression from a moment earlier, it seemed that something had changed after all.  (It helped to see this when I changed Process Handler > View > Update Interval to a slower setting.)  Maybe this change was due to my adjustments to the settings, or maybe GoodSync had finished something it was working on, but for whatever reason it had dropped from an I/O Total Rate of 20+ mB/s to more like 3 mB/s.  I suspected that I had now given myself the equivalent of an option to "Run only when computer is idle."  With all these priorities set so low, hopefully the computer would suppress GoodSync when I had other things to do.  The risk now was, no doubt, that GoodSync would never finish its tasks.  I would have to just let it run a while and see how that went.

After closing Process Hacker and letting a few days pass (along with a reboot or two), I returned to see what was happening with GoodSync.  The system had now been up for a little over two days, and at this moment the spinning system tray icon showed that GoodSync was actively at work.  PH showed GoodSync as having 1.14GB in Private Bytes allocated to it.  Its I/O Total Rate was not exceeding about 1.5 mB/s.  It looked like my settings had persisted.  I was not actively using that machine at that point, so I couldn't say whether there would still be noticeable slowdowns.  But it seemed unlikely.  Moo0 was reporting that the CPU, RAM, and hard drives were almost never fully burdened.  And yet GoodSync did seem to be getting its tasks done.

I was not quite sure whether Process Hacker right-click settings all applied only to the specific process that I had clicked on.  Some appeared to apply to all, or at least multiple, processes.  There was more to learn.  But at least it did appear that Process Hacker had enabled me to slow down a program that was grabbing too much of system resources, without noticeably impairing that program's functioning.

Thursday, January 13, 2011

Windows 7: Scaling Back the Ambitions

I was installing Windows 7.  I had spent nearly two weeks learning about it and tinkering with some of its possibilities.  I had learned quite a bit, and was impressed with much of what I saw.

At the same time, I was sobered by the prospect of spending additional weeks in this exploration.  It did appear that a commitment of that kind would be required to follow through with the Windows 7 projects I was looking into at that point.  Although this period of almost two weeks of tinkering and exploring had been brief compared to some periods of computer-related investigation that I had experienced in the past, it was still a large chunk of time, some of which I would rather have spent focusing on other things.

I had pulled back from my ongoing Ubuntu exploration, near the start of this project, because of its time requirements and the drawbacks I had experienced with it.  During these past two weeks, I had found that Windows 7, while being a sophisticated operating system, was still not entirely stable.  The plan of building a whole structure of RAID arrays and bootable virtual hard disks (VHDs) on Windows 7 was beginning to look like another indulgence that would continue to demand large amounts of time, not only to learn more about it, but also to maintain and repair it.

Certainly I could work toward setting up a RAID5 array eventually, as need and conditions dictated.  I could stay attuned to developments in the area of VHDs.  No doubt I would continue to refine my system in various ways.  But for purposes of my primary scholarly work, as distinct from various other projects of secondary interest, it was not essential to have RAID0 performance for my data partition or, with the aid of a bootable VHD, for my Win 7 boot partition.

As I pondered these thoughts, it seemed that my pullback from Ubuntu, a few weeks earlier, had been a sign of a change of direction with the arrival of the new year.  I liked improving my system and learning about these things.  Indeed, I believed I would like those sorts of activities more, if I approached them less ambitiously, with more patience to learn about and explain an occasional system development.

I still had some issues to work through, to achieve the more ordinary functionality that I did need.  Even those issues had the potential to consume another week or more.  But in the big picture, I felt that the time had probably come to scale back my system plans.  Accordingly, I decided to focus, perhaps for the coming year, on improving aspects of my system that seemed most crucial, particularly in the areas of reliability and trouble-free functionality.

Tuesday, April 29, 2008

Update: Recorded Speech to Text Conversion

Every now and then, I run into someone who is doing qualitative research and wants to know about speech-to-text conversion. Here is an update that will answer some of the questions I have been asked during the past year or so in this area. I know some people will be doing interviews this summer, so maybe this will help. The basic idea is that you have recorded something -- an interview, perhaps -- and now you want to connect your recorder to your computer and have the interview become automatically converted into a Word document. If the computer knows when to insert a colon rather than a semicolon, so much the better. Unfortunately, that's still a dream, according to an article published last week by James A. Martin of PCWorld. Then again, a review by Nate Anderson of Ars Technica indicates that Nuance's Dragon NaturallySpeaking, a leader in this area, has made great advances in recent years. Anderson provides an illustration of several paragraphs in which Naturally Speaking actually outperformed his own typing at the keyboard -- provided that he first sat down with a microphone and trained the software to understand his pronunciation. Minimum training requires a few minutes; best results come after several months of use. So the program may do pretty well with your side of the interview -- but less so, most likely, with the words uttered by the interviewee, who will ordinarily be doing most of the talking. (Note: I have seen "Naturally Speaking" spelled both with and without an internal space, so you may want to try both if you're searching for more information. See e.g., http://tinyurl.com/58238m for suggested search syntax.) In theory, you could train the software to understand the voice of the interviewee instead -- by e.g., having him/her read a section of text into the recorder, and then teaching Naturally Speaking to understand it later, in the privacy of your own communal workstation, and in that case I think it would be your questions, not his/her answers, that would require repair afterwards (though perhaps you could avoid that by simply cutting and pasting pre-typed versions of your questions into your interview transcript. Naturally Speaking allows for multiple user profiles, so apparently this would require the mere addition and training of another voice account, without having to delete the previously entered account. Best results in this area have traditionally come from dictating into a high-quality microphone directly connected to the PC. Now, however, Anderson says that Naturally Speaking does an "acceptable" job even when the recording was made using the internal microphone on a mediocre MP3 player. Martin's point, in his article, was that the Sony ICD-MX20DR9 digital voice recorder (now about $230 plus $25 or so for an additional memory card) comes with a copy of Naturally Speaking (so you don't have to buy a copy separately), was designed for use with Naturally Speaking, and is listed as a compatible model on Nuance's Hardware Compatibility List. Among the numerous options on Nuance's Hardware Compatibility List (e.g., Headset Microphones (legacy)), there are two for recorders specifically. On the Recorders (legacy) list, only five old models get a three-star rating. On the Recorders (current) list, by contrast, the Sony ICD-MX20 (I assume the DR9 suffix simply means that Dragon Naturally Speaking is included with the hardware) gets six stars -- and is the only recorder that gets more than five stars. I suspect each additional star means, in practice, a somewhat higher percentage of accuracy -- which could translate into many hours of seeking and correcting text. So if you were doing your interviews within the next few weeks, one approach would be to shoot first and ask questions later -- i.e., buy the Sony, train it, experiment with it, and see if it saves you a ton of typing. That might make less sense if you were doing your interviews in a noisy environment, though. There are some differences among versions of Naturally Speaking (ranging in price from $60 (standard) to $1,200(legal)). I'm not sure which version comes with the Sony ICD-MX20DR9. In a detailed review of the software (i.e., not the Sony), Cade Metz of PC Magazine says the "results were pretty darn good," and describes the option of doing voice rather than keyboard correction of errors -- which may be available only on more expensive versions (not sure). Elsa Wenzel of ZDNet seconds Metz's view that Naturally Speaking is the best consumer voice recognition program available. As is often the case, however, users' opinions vary dramatically -- possibly as a function of having the right hardware and/or doing the required system training in the recommended manner. Off the topic of interviews, but of social work relevance: Rita Zeidner of the Washington Post points out Naturally Speaking's productivity implications for persons with disabilities.