What is the mystery with UNIXProcessReaper??

I am making this post partially to actually get its name on to the net (Google has zero hits on UNIXProcessReaper) but mainly to garner some insight into a major problem I have "sort of" solved. OK, so I'm a Java newbee, having to maintain a bunch of dodgy Java code running on Linux (Redhat 7.2) with Java 2 Runtime Environment, Standard Edition (build 1.4.0-b92), Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode).
Typically the application chews up about 2 - 4% of the cpu when running. I re-wrote the logging facility and (stupidly it seems) removed the BufferedOutputStream from the file I/O, which caused the application to go crazy, sitting on 100% of cpu usage for 5 to 10 seconds at a time. Note that the total logging load would not be more than 300 bytes / second.
The mystery for me is that the profiler showed the following activity during these spasms:
CPU SAMPLES BEGIN (total = 117209) Mon Oct 21 16:43:23 2002
rank self accum count trace method
1 32.74% 32.74% 47417 4636 java.lang.UNIXProcessReaper.run
2 32.73% 65.47% 47907 3227 sun.awt.motif.MToolkit.run
3 1.64% 67.11% 1922 30291 sun.awt.font.FontDesignMetrics.handleCharWidth
4 0.32% 67.43% 370 30187 sun.awt.font.NativeFontWrapper.getCharMetrics
5 0.24% 67.67% 285 30292 javax.swing.plaf.basic.BasicLabelUI.getPreferredSize
6 0.23% 67.90% 271 30284 sun.awt.SunToolkit.getFontMetrics
7 0.22% 68.13% 261 30285 java.awt.font.FontRenderContext.getTransform
8 0.22% 68.34% 254 30286 sun.awt.font.FontDesignMetrics.<init>
but nothing gives me any help on UNIXProcessReaper, it is not mentioned in any Java documentation, and as I started out saying, it has zero hits on Google. I guess it is (or part of) the garbage collector. BTW, my intuition tells me the application has some other fundamental problem lying just under the surface, probably to do with how it uses swing, and I just dug deep enough to expose it.
Can anyone shed any light on why unbuffered I/O would cause such problems and why the UNIXProcessReaper has not been mentioned by any other lost newbee?
Cheers,
Scott.

From the docs :
"By setting up such an output stream, an application can write bytes to the underlying output stream without necessarily causing a call to the underlying system for each byte written. The data is written into an internal buffer, and then written to the underlying stream if the buffer reaches its capacity, the buffer output stream is closed, or the buffer output stream is explicitly flushed. "
So this means that unnecessary calls are removed during writting. Instead of making multiple writes when you receive data, a write is only done when the buffer is full. That's why it is more efficient. The java tutorial also states this in this url : http://java.sun.com/docs/books/tutorial/essential/io/datasinks.html
If you are a newbie who is worried too much about logging, I'd suggest you take a look at the log4j project. Check it out at
http://jakarta.apache.org

Similar Messages

  • I opened a file on my desktop that I don't remember putting there.  It turned out to be a keychain certificate from a client of ours.  Does this mean that they were spying on me?  What is the deal with that?  Any ideas?

    I opened a file on my desktop that I don't remember putting there. We use many photos and I thought it was a photo file I was looking for. It turned out to be a keychain certificate from a client of ours.  Does this mean that they were spying on me?  What is the deal with that?  Any ideas?

    Interesting tid bit.  I created an AAC of the original file, deleted the original MP3 from my library and also deleted the Clean matched track from the icloud.
    Result is that it matched with the explicit version of Mrs. Officer this time.
    What I am curious about is which songs this is happening for. I've went thru a few batched of about 500 songs at a time and redownloaded in 256k for many tracks. Sadly we don't have people to bring this to our attention and I have so much music that it's impossible to go thru every song to make sure I am getting the right version.

  • What is the wrong with my select query

    HI All,
    TYPES: BEGIN OF t_equi,
             equnr          TYPE equi-equnr,
             aedat          TYPE equi-aedat,
             matnr          TYPE equi-matnr,
             sernr          TYPE equi-sernr,
             kunde          TYPE equi-kunde,
             zzreg_date     TYPE equi-zzreg_date,
             zzin_indic     TYPE equi-zzin_indic,
             zzinvoice_num  TYPE equi-zzinvoice_num,
             zzinvoice_date TYPE equi-zzinvoice_date,
             kund1          TYPE equz-kund1,
          END OF t_equi,
    DATA: it_equi        TYPE TABLE OF t_equi,
      SELECT equnr
             aedat
             matnr
             sernr
             kunde          "Ship to
             zzreg_date
             zzin_indic
             zzinvoice_num
             zzinvoice_date
             kund1            "Sold to
             INTO TABLE it_equi
             FROM equi AS a
             INNER JOIN equz AS b
             ON a~equnr = b~equnr
             WHERE a~equnr      IN s_equnr AND
    *               aedat GE gv_rdate AND
                   a~matnr      IN s_matnr AND
                   a~sernr      IN s_sernr AND
                   a~kunde      IN r_shpbr_kunde AND
                   a~zzin_indic IN s_indic  AND
                   b~datbi      EQ c_datbi  AND 
                   b~kund1     IN r_sldbr_kund1 .
    what is the wrong with this select query.. ?
    its giving me error  "The column name "EQUNR" is unclear ."
    Thanks

    Hi ,
    write  tablename or alias in select also
    SELECT a~equnr and check.
    Regards

  • I recently upgraded to iTunes 11.1.5 and now my iPod Nano is not recognized in iTunes. I also upgraded my iPhone 5s to iOS 7.1. i Tunes on my computer does recognize my iPhone. What is the problem with my iPod Nano not being recognized?

    I recently upgraded to iTunes 11.1.5 and now my iPod Nano is not recognized in iTunes. I also upgraded my iPhone 5s to iOS 7.1. i Tunes on my computer does recognize my iPhone. What is the problem with my iPod Nano not being recognized?

    I would think, Twins1995, that if we are having the problem, others are as well. Hopefully, Apple will shortly issue a follow-up software release to fix the problem. Or is that just wishful thinking on my part.
    It would be helpful, if there were some kind of work-around in the interim, so we can use our devices. Pretty frustrating when you consider that all of the hardware and software is produced by Apple.

  • I have an iBook g4 14" 1.42 ghz. I recently installed a new hard drive.  I put the install CD in. Then, I pressed the power button, then the "C" key. Black screen and No chiming. Please tell me, what I can do to resolve this? What is the problem with it?

    I have an iBook g4 14" 1.42 ghz. I recently installed a new hard drive.  I put the install CD in. Then, I pressed the power button, then the "C" key. Black screen and No chiming. Please tell me, what I can do to resolve this? What is the problem with it?

    Since it will not boot then a hardware test can't be run. You could try FireWire Target Disk Mode and if it works then access from another Mac to run tests on the new drive. You could also try installing the OS X software from the host computer. If this does not work then professional help should be considered.
    http://support.apple.com/kb/ht1661
    http://osxdaily.com/2010/04/07/how-to-boot-a-mac-in-target-disk-mode/
    http://www.macobserver.com/tmo/answers/how-to-use-target-disk-mode-to-boot-from- another-macs-hard-drive

  • Why is my Apple ID working on the Apple Website on the computer but not restoring my ipad... What is the problem with it????

    Why is my Apple ID working on the Apple Website on the computer but not restoring my ipad... What is the problem with it????

    LeesaHeeley wrote:
    When I go to settings/iTunes App Store my Apple ID is not there. When I enter my ID and password it does not save or link to account.
    When fist setting up your new iphone you will be asked to log in with an apple id and password. If this did not happen you can then do as you suggested going to settings to itunes and app store and add your apple id login. This apple id login must have already been created for the iphone to accept it. If this apple id is already created but is not being accepted by your iphone you then should shut down your iphone and restart the device.
    Good luck.

  • What does the symbol with a lock inside the refresh key in the upper right of my iphone4s and how do I unlock it?

    What does the symbol with a lock inside the refresh key in the upper right corner of my iphone4s mean and how do I unlock it?

    This is all covered in the manual:
    iPhone User Guide (For iOS 5.1 Software)

  • What is the problem with Itunes 11.0.1.12 and adding music to the Library?

    What is the problem with Itunes 11.0.1.12 and adding music to the Library?  I had no problems when I updated, just had to get used to the new format and appearance.  Added a few albums here and there, and then today I can't get anything in the Library.  I've always just dragged and dropped my music with no problems.  I've had an Ipod for the last six years and never encountered any big problems with Itunes or my various Ipods.

    Why is this Itunes such a pile of junk?  If I restart my computer I can sometimes find the recently added music in my Itunes Library. 
    It would be nice to know if other people are having the same problems.

  • TS1398 what is the trick with getting connected to airport WiFi?  It takes forever to go from the settings portion then to the browser to "accept" terms.  Am I missing something to speed the process?

    what is the trick with getting connected to airport WiFi?  It takes forever to go from the settings portion then to the browser to "accept" terms.  Am I missing something to speed the process?

    OK, I figured out from the various postings on here and way too many hours overnight how to pretty much make the Yoga do what it is supposed to do. I've written up a step by step at this link that may help some of you with your problems as well
    Let me know if this helps!

  • What's the deal with dual processors???

    The whole dual processor thing has been bugging me for some time now. If I have a dual 500mhz processor, is it the same as a 1.0ghz processor, worse than one, better than one?! Are there other factors at play? In my limited scope, if you had a dual 500, 533, whatever, it would be the same as a single 1.0ghz - and yet these dual processors are priced much cheaper. I really am at a loss as to how computers do their processing, and how to compare single processor G4's and dual processor G4's when making a purchase.
    Insight would be greatly appreciated!

    And you shouldn't forget, the future is multiprocessors. There is a limit to miniturization, and the solution seems to be multiplication. So operating systems and applications are increasingly going to be multiprocessor-aware. Maybe a perfect example is the upcoming MacOS release, Snowleopard. Apparently, there will be almost no cosmetic changes. The changes will essentially be 'under-the-hood'. And you can bet, that some of those changes will be increased efficiency with respect to multiple processors.
    So what's the deal with airplane peanu...err, dual processors?
    The advantage, theoretically is, having more workers to do the work. Your 1ghz processor is like a worker who can lift 100kg, and your 500mhz are like workers who can lift 50kg each.
    So where's the advantage? If you have a farm with 40 kg hay bales in the field that you need to pick up, your better off with two workers than one right? Or 8 workers in the case of a 8-core MacPro. So an multiprocessor-aware operating system, doles out the work much more efficiently, spreading the tasks around, or spreading a single task around in pieces (if the app is so written).
    You've heard of render farms? The multiple computers used to render the frames of animated movies? Its the same principle. Having computer 1 render the first 1000 frames and computer 2 the next, the project gets done within a lifetime. If they had had only one computer, ToyStory would still not be finished.
    Its the future. Just wait till the end of this year for example. Nehalem chips will be sporting even more processors.
    Try these;
    http://discussions.apple.com/thread.jspa?threadID=1619399&tstart=0
    http://arstechnica.com/news.ars/post/20070605-intel-updates-compilers-for-multic ore-era.html
    Nehalem; http://techreport.com/discussions.x/12130

  • What's the deal with the video format?

    Hello! What is the deal with the video format? Does it mean I have to code the videos for 640*480 ? It won't accept any other size? What size do I need to select for widescreen format?
    With Quicktime pro I've been able to encode videos with a very nice resolution and small size, then try to synch them to the ipod touch and then the error, it can't be played. I use the .mov format, I like it more but if I have to use .mp4 then I'll use it.
    Thanks for the help!

    According to Apple's Specification, these are your video choices
    H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats.
    http://support.apple.com/kb/SP496

  • What's the deal with the CC menubar panel?

    What's the deal with the CC menubar panel? The tab to the apps are gone -- looks like it wants me to update the panel itself rather than list my installed apps. I've been on CC for about a month, is this common? Thankfully I can still open all apps normally, but the internet seems to think the "CC Way" is a horror show.
    Do you guys have trouble after updating the updater? All this talk of running "the cleaner" (a mafia term?) and reinstalling everything with each version bump is kinda scary. It could be that people only post online when things go wrong, and 95% of people update just fine. But since I'm new I guess I'd want some reassurance before committing to a night of Cleaning and Reinstalling...
    I'm one of those people who think app updates very 12 to 18 months was just fine (and stable). Would it be harmful to ignore updates for a few months? Lets see, I have a healing brush, smart objects, a blob tool, pretty good 3D in AE, ID seems to handle type pretty well… there's really no reason to update every month is there?
    -- Jim

    Has anyone had a normal non-cleaning install of this week's update?

  • What's the deal with Quicktime?

    What's the deal with Quicktime? In the past, there was just plain Quicktime. Then it was separated into two different versions: Standard and Pro. I bought the Pro version for my eMac. Then, when I moved to my 24" iMac, Quicktime was made into just one version again, and the features were rolled into it. Now that I have my 27" iMac running Lion, I find that a bunch of the menu items are greyed out and have the word "Pro" next to them. Also, I'm finding that it can't open many standard files, such as .MOV files that run fine on my older Mac, because "a required codec is not available." What's going on?

    There are two versions of QuickTime Player available for Snow Leopard and Lion systems. The QuickTime Player X included with those versions of Mac OS X have some of the features previously only available with a Pro key to unlock QuickTime Player 7.
    QuickTime Player 7 is an optional installation on SL and Lion, and apparently you installed it or it carried over across an update. If you wish the Pro features activated, you need to enter in your Pro key just as you did previously (you will need a key for QuickTime 7; an older key will not work). Then the Pro features will be available again, though support for some old codecs is no longer available. For more information, see:
    http://support.apple.com/kb/HT3678
    Regards.

  • What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off., What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off.

    What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off., What's the deal with the swoosh sound when sending texts? IOS 5.1 needs to have an option to turn it off.

    Trax and kirt are correct. I'm pretty good with technology, being an engineer and all, and I can tell you for a fact that this 'swoosh' sound (triggered by a successfully sent SMS) can NOT be disabled from ANY menu in iOS 5. The ONLY way to disable it is to flip the silent switch on the left hand side of the phone. This is extremely annoying for some people (like trax, kirt, and myself). For what we pay for Apple products and, in particular, this phone, we simply didn't expect to have to deal with such annoyances. That's why we're Mac users. Please fix this bug.
    I feel like I shouldn't have to say this but it bears repeating: turning off message sounds from the 'sounds' menu does not fix his problem. It still emits the swoosh noise. Whoever suggested this clearly didn't try it because it obviously doesn't work. Who posts a solution to a problem without knowing for a fact that their solution is correct? I find that response condescending because he writer is assuming we're not smart enough to have tried it. In reality, it's vice versa.

  • What's the deal with bluetooth mice ?

    What's the deal with bluetooth mice ? I've never heard of any model yet that didn't come with loads of complain... (I've done my research) ... isn't there one that just works fine and that will for a few years like a standard mouse ?
    I would really like one with my macbook, any recommendation, something portable, that matches well my hardware would be nice.
    Or should I just wait until bluetooth mice technology works flawlessly ? What about you ?
    Francis.

    I've had a Macally BtMouseJr for a couple of years now, it's fairly basic but every time I've tried to replace it with a "better' one I've had to come back because of lock ups, losing the mouse altogether, slow response, random movements et al.
    Therefore the BtMouseJr is the ONLY one I can actually recommend (I retract my prvious recommendation of the Sony vaio mouse - it's nice but it doesn't always work and eats batteries) wholeheartedly.
    see it here.

Maybe you are looking for