Processor Affinity and availableProcessors()

We user the call availableProcessors () from java.lang.Runtime to determine how many cores our application is running on. This is done for licensing reasons.
For customers running on a multicore machine who are not fully licensed for all cores, we tell them to use the processor affinity methods in both Windows and Linux. But here's the problem.
If you have a Windows dual core machine and don't set any processor affinity for the java app, you get a result of 2 which is the correct number of cores. If you set the affinity of the java app to one core on a Windows dual core machine, you get the results of 1. Which I believe to be correct because that is the number of processors available to java since the affinity has been set.
However, it is completely different in Linux. On a dual core Linux machine, setting affinity using taskset to one processor, availableProcessors() still returns 2.
Why is this? If the processor affinity has been set in Linux, then why would the number of available processors be reported incorrectly?

Hello,
I would assign 8 CPUs to affinity mask (CPU) and 8 CPUs to I/O affinity mask per instance.
Please read about why you should not assign the both to the same schedulers on the following post.
http://blogs.msdn.com/b/psssql/archive/2010/11/19/how-it-works-io-affinity-mask-should-i-use-it.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • Setting the same CPU for processor Affinity and I/O affinity..

    Hi All,
    I have a server  with two sql server instances and 32 CPU in which I have to give 16 CPU - 16 CPU  to each SQL instance.
    each CPU has both processor Affinity and I/O affinity.
    As per Microsoft we should not assign both processor Affinity and I/O affinity to the same CPU.
    What would be the best practice in My case??
    I am using SQL Server 2014 SE on Windows server 2012.
    aa

    Hello,
    I would assign 8 CPUs to affinity mask (CPU) and 8 CPUs to I/O affinity mask per instance.
    Please read about why you should not assign the both to the same schedulers on the following post.
    http://blogs.msdn.com/b/psssql/archive/2010/11/19/how-it-works-io-affinity-mask-should-i-use-it.aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Processor affinity assignment in RT

    Hi all,
       Another question, different project. I'm pretty sure that I read, or heard at a NI Seminar, that only one timed loop can be assigned to each processor/core on a multi-core machine. I'm pretty sure because I do remember that in that same conversation/article it was suggested that if processor affinity was the constaint, rather than the critical timing of the loop, that I could put several vi's in a "timed sequence" frame, allowing processor assignment. So, I guess the question is:  can more than one timed loop be assigned to a core (I'm remembering no)?
    Thanks, from a tired LabVIEWer, who is battking some health issues as well as trying to put some LabVIEW issues to bed. My mean old boss keeps cracking the whip!!!  
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

    The answer to your specific question is yes, multiple timed loops can be assigned to the same core. But it sounds like the Dev. Zone document "Specifying the Set of CPUs Available for Automatic Load Balancing in LabVIEW Real-Time" might be helpful. With the VIs attached to that document you have complete control. You can specify which CPUs are used for automatic load balancing for both the OS pool and the Timed Structures pool. You can also reserve CPU to not be in either pool so that nothing will be automatically load balance on to them leaving them under your complete control to target Timed Structures to them. You can target Timed Structures to any CPU regardless of it's pool assignment or if it is reserved.
    -JRA

  • I have a MacBook Pro2,2 with an Intel Core 2 Duo , 2.33 GHz processor speed and am running OS X 10.4.11 and am having trouble finding which operating system update my computer will support?

    have a MacBook Pro2,2 with an Intel Core 2 Duo , 2.33 GHz processor speed and am running OS X 10.4.11 and am having trouble finding which operating system update my computer will support. Any advice?

    Mac OS X 10.7.5, which requires getting a Mac OS X 10.6 DVD from the online Apple Store and a download code for 10.7 by phoning them.
    (73160)

  • TS3938 I have a power pc processor g5 and cannot load adobe flashplayer.  Anyone know how?

    I have a power PC processor g5 and cannot load adobe flashplayer.  Does anyone know how?

    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version,10.3.183.23 or later, is for Intel Macs only running Tiger or Leopard, as Adobe no longer support the PPC platform. Version 11.4.402.265 or later is for Snow Leopard onwards.
    * Unhelpfully, if you want the last version for PPC (G4 or G5) Macs, you need to go here:  http://kb2.adobe.com/cps/142/tn_14266.html  and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here:  http://kb2.adobe.com/cps/838/cpsid_83808.html
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications first before installing. You must also carry out a permission repair after installing anything from Adobe.
    (If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, try the following solution which fools the site into thinking that you are running the version 11.5.502.55:)
    Download this http://scriptogr.am/nordkril/post/adobe-flash-11.5-for-powerpc to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.

  • Processor speed and RAM for Aperture? Comparing MacBook Pros.

    I'm about to purchase a macbook pro and thought it best to ask people who are actually using aperture and other image editing software this question. I need to know if a boost in processor speed and video card from the 2.16 to the 2.33 MBP is noticable enough to make a difference. I'm just getting into RAW editing and my iBook can't handle aperture because of the video card, and I don't want to have any problems in the future. Is the price worth the difference?
    I've tried posting in other places and have had little response, so I would appreciate it a lot considering I need to purchase today or tomorrow!

    All in all, I'd recommend the 2.33 for Aperture. You'll likely keep this laptop for a 2-3 years, so what do the extra dollars give you?
    The modest speed bump between 2.16 and 2.33 is OK ... Aperture will use it, esp. since there are 2 x procs. It's really 2 x 10% uplifts, theoretical. You will feel around a 5-10% improvement I suspect.
    The bigger reason is the video card VRAM .... 256Mb v 128Mb. VRAM WILL BE USED BY APERTURE and cannot be upgraded later. You soon notice when your RAW's or scanned images are paged from VRAM to main memory and back. Aperture moves the image into VRAM for processing image data using the GPU. More is a good, good thing..... esp. if you ever hang a 2nd monitor off your laptop (which is very common practice).
    The additional 1Gb RAM is also needed. Aperture runs like a dog with 8Mpixel plus RAW's on 1Gb RAM and really starts to cruise on 2Gb.
    So, you'd need the extra Gb RAM anyway, $175 add-on. That leaves a net of $325, or less than $10/month over the life of your laptop.
    All in all then, I'd recommend the 2.33 v 2.16 for Aperture.
    G.

  • Processor speed and built-in memory of iPad Air and iPad Mini with Retina Display?

    Does anyone know the Processor Speed and Built-in Memory Size of iPad Air and iPad Mini with Retina Display?
    Header 1
    Processor Speed
    Built-in Memory
    The New iPad (iOS7)
    1 GHz
    1 GB
    iPad Air
    iPad Mini with Retina Display
    I tested them side-by-side in Apple Store today and after the same 10 apps loaded, I didn't feel significant speed gain from iPad Air and iPad Mini with Retina Display from my New iPad.
    I wonder what Processing Speed and Built-in Memory do the iPad Air and the iPad Mini with Retina Display have.
    Can someone who has upgraded give any feedback?

    Thanks Diavonex.
    Header 1
    Processor Speed
    Built-in Memory
    The New iPad (iOS7)
    1 GHz
    1 GB
    iPad Air^
    1.4 GHz
    1 GB
    iPad Mini with Retina Display#      
    800 MHz* 
    1 GB
    iPhone 5S
      likely 1 GB
    * Battery Doctor app revealed.
    # Apple APL0698 SoC  A7 Processor
    ^ Apple APL5698          A7 Processor
    No wonder I don't fee much speed improvement on iPad mini with Retina Display (128 GB WiFi + Cellular).

  • DEAR FRIEND..PLEASE GIVE ME COMPAQ PRESARIO V3500 MODEL V3751AU AMD PROCESSOR AUDIO AND SOUND DRIV

    DEAR FRIEND..PLEASE GIVE ME COMPAQ  PRESARIO V3500 MODEL V3751AU AMD PROCESSOR AUDIO AND SOUND DRIVER

    Hi,
    This is all supported derivers from HP:
      http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3413040&lang=en&cc=us...
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Image Processor Pro and Picture Processor load eps files without rasterizing them

    Hi. My name is Lucas. Im from Argentina, now living in Brazil. I have the problem that is in the title. Im new doing this stuff but reading a lot i discovered that both scripts open eps files and because they dont get reasterized, then saved files looks preety bad.
    I know that there are some parameters to open eps, ex:
    var epsOpenOptions = new EPSOpenOptions();
       epsOpenOptions.antiAlias = true;
       epsOpenOptions.mode = OpenDocumentMode.RGB;
       epsOpenOptions.resolution = 72;
       epsOpenOptions.constrainProportions = true;
    I have to say that looking for a solution a found a script and modified to suit partially my needs. I said partially because i need the script to look folders and save output files with same structure. Here is the script that manage one folder at a time:
    #target photoshop
    // Asks user for input folder
    var inputFolder = Folder.selectDialog("Select a folder to process");
    // Asks user for output folder
    var OutputFolder = Folder.selectDialog("Select a folder to save your Tiffs");
    if ( inputFolder != null && OutputFolder  != null ) {
       // Makes list of all files located in that folder
       var fileList = inputFolder.getFiles( "*.eps" );
       // Create a EPS option object [height & width are doc size]
       var epsOpenOptions = new EPSOpenOptions();
       epsOpenOptions.antiAlias = true;
       epsOpenOptions.mode = OpenDocumentMode.RGB;
       epsOpenOptions.resolution = 72;
       epsOpenOptions.constrainProportions = true;
       // Open each file in turn
       for (var i = 0; i < fileList.length; i++) {
          // open the file
          app.open( fileList[i], epsOpenOptions );
          var baseName = activeDocument.name.slice( 0,-4 );
          // put your code to 'save as' the file here
          var saveFile = new File ( OutputFolder + "/" + baseName + ".jpg" );
       SaveForWeb(saveFile,60); // set quality to suit
    function SaveForWeb(saveFile,jpegQuality) {
      var sfwOptions = new ExportOptionsSaveForWeb();
      sfwOptions.format = SaveDocumentType.JPEG;
      sfwOptions.includeProfile = false;
      sfwOptions.interlaced = 0;
      sfwOptions.optimized = true;
      sfwOptions.quality = jpegQuality;
    activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
    activeDocument.close( SaveOptions.DONOTSAVECHANGES ); 
    So, if you know some way modify image processor pro or picture processor i will be very pleased.
    Because i will only use the script to manage eps files and save them as jpg (save for web) i dont need an special button to activate that option. Keep it simple. Thanx!!

    You can tweak ImageProcessorPro.jsx by make the following edit.
    Search for code that looks like this:
    ImageProcessor.prototype.openDocument = function(file) {
      var self = this;
      var settings = self.settings;
      var mode = DialogModes.NO;
      var ext = file.strf("%e").toLowerCase();
      var isRaw = ImageProcessor.CAMERA_RAW_FILES.contains(ext);
      if (isRaw) {
    and insert this code right after it:
      if (ext == "eps") {
        var epsOpenOptions = new EPSOpenOptions();
        epsOpenOptions.antiAlias = true;
        epsOpenOptions.mode = OpenDocumentMode.RGB;
        epsOpenOptions.resolution = 72;
        epsOpenOptions.constrainProportions = true;
        try {
          var doc = app.open(file, epsOpenOptions);
        } catch (e) {
          Error.runtimeError(9002, ZStrings.UnableToOpenErr);
        return doc;
    I haven't tested this at all but it looks good from here.

  • Batch Processor, WIA and Inferred entity instances

    Hi All,
    I'm playing around with the new OPA 10.4. I bumped into an error in What-If-Analysis document when I tried to add a new worksheet for an inferred entity. Is this not possible in WIA? Does it mean it will not work as well with Batch Processor.
    Here's my data model:
    global
    --- the applicant
    --- --- the qualification
    --- --- --- the exempted course (inferred instances from 'the qualification' attributes)
    Thank you in advance!
    Regards,
    Jerome

    Brad Tuckett wrote:
    Jerome wrote:
    Is there a possible workaround right now in 10.4 to persist inferred instances in Batch Processor?The Batch Processor will not output any inferred instances in 10.4
    One more thing, I'm also using 10.2 and have implemented InferencingListener to create instances, would you happen to know if I will bump on the same issue with DSC?
    There probably isn't a way of having any entity instances created by an event listener appear in the Batch Processor output for database or CSV.
    However, you may be able to set the output to saved sessions. Although this isn't explicitly supported, I would expected that any instances you have created would show up in the exported sessions, which will be xml files in the xds format. This will create one session file for each case.
    You can set the output to be exported sessions by using "--export <dir>" in the command line or use the xml configuration for the Batch Processor.
    When 10.4.1 is released you should be able to switch to using inferred entities which will be compatible with the Batch Processor.

  • High processor use and blank messages in Yosemite mail

    Hello
    I am noticing very high processor use from Yosemite Mail, and I am also having problems with blank messages.
    Under Mavericks, I had a problem where I double click on a mail message to open it.  The message would flash on the screen for a moment and then disappear.  The message in my inbox would be marked as read.  I could then open it again and read it normally.  Over time, I tracked this down as having to do with Mail doing anything else when I requested to open the email.  For instance, if I delete a message and then immediately try to open the next message, the problem would occur.  If I waited 5 seconds or so, then opened the next message, the problem would not occur.
    Now, under Yosemite, I find that if I open a message quickly after performing another task, the message window is blank and never fills in.  I can close that message window and open it again, it may work, or it may still be blank.  I have found where certain messages appear to be stuck and will open blank until I open a different message and then come back to the problem message.
    I have also noticed that Mail under Yosemite appears to use very high percentages of processor time.   Checking the activity monitor, Mail is third behind WindowServer and kernel_task for processor usage.  And I have another question on the community about my system running hot with the fan spooling up and down constantly under Yosemite, something that almost never happened under any of the previous OS's going back to Snow Leopard.
    Any idea what is going on with the Mail app in Yosemite?  I was excited about Mail finally advancing in capability, but it seems to have come at a cost.....  Come on Apple - Mail needs to catch up with Outlook!

    I also have this problem since Yosemite upgrade. Infuriating because I can't just read incoming emails anymore. It seems to be specific to one email account and doesn't necessarily cause a problem with others. When this happens, (showing the content for a second then disappearing), there is a segmentation fault reported in the error log.
    For me, this is a category one critical business problem. If I can't read and reply to incoming email reliably on my computer, I will need to switch to another system or device that can.
    24/10/2014 14:51:34.839 com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
    24/10/2014 14:51:36.262 com.apple.xpc.launchd[1]: (com.apple.WebKit.WebContent.A9C826DA-A925-4168-ADFD-46A9B4012097[6900]) Service exited due to signal: Segmentation fault: 11
    Good news is that the email app does seem to work a bit quicker than before using Mavericks where it could hang for 10-20 seconds for no particular reason.
    Hope this can be fixed or a workaround posted soon.

  • Problems with the processor , fan , and energy consumption

    Hello .
    Well , for some reason , my two years old laptop started to behave in a weird way . I just ignored the slight slowdown with the boot because I believe it's to be expected with any machine but that's not the issue . Aside from the annoying fact that Windows 7 doesn't seem to make full use of the RAM and thus it only uses HALF - yes , HALF - of my 6 GB RAM , my PC seems to slow down regulary while I browse the internet . I recently knew about the task manager and decided to take a look to be shocked at how much RAM Firefox and Google Chrome use . Along with other necessary system tasks - which almost don't count - , they alone take 30% of the RAM capacity . That's unfortuenately isn't the issue either because I can close any of them when I want to work on other stuff . The issue here is that for no apparent reason , my processor seems to work harder than is necesarry even when the programs I see in the task manager don't need 5% of it's full potential ! With such work it heats up . On Toshiba Health Monitor I see it going to 70-75% in heat and the fan kicks up to 85% to cool it down . Of course , that leads to rapid power consumption that can suddenly shoot from 17% to terrible 60% with ABSOLUTELY NO PROGRAMMS CURRENTLY AT WORK ASIDE FROM WINDOW EXPLORER .
    The good thing is that it doesn't happen all the time but it still worries me . Any ideas ?

    See my post on your other thread to obtain your model and part numbers. It's difficult to discuss your unit's use of RAM and other problems without that info.
    Mike

  • Looking to buy new MacBook Pro for editing with Premiere/After Effects, but wondering about trade-off between Processor Speed and Graphics Card

    I'm a professional video editor (using Premiere and After Effects) looking to buy a new MacBook Pro and am deciding between two models. The slightly older model has a 2.8GHZ i7 (3rd generation) Quad Core processor with a 1GB SDRAM of NVIDIA GE FORCE GT 650M Graphics Card. Then newer model has a 2.3GHZ i7 (4th generation) Quad Core preocessor with 2GB SDRAM of NVIDIA GE FORCE 750M/Intel Iris Pro Graphics Card.
    Which makes the most difference (processor speed vs. graphics card) with editing with Premiere and After Effects?
    Any help/guidance would be greatly appreciated.
    Thanks!
    mike

    Poikkeus wrote:
    1. Your MBP will be somewhat slower than your iMac, as reflected in the general speed; desktop Macs have more RAM and storage.
    You recon? If he get's the 17", he would have up to 8x more RAM, 4 x more GPU,, and  a bit faster CPU;.
    2. Be aware of the advantages and disadvantages of extra RAM. Loading up the slot will make juggling multiple applications easier, like Photoshop, VLC, and Safari. However, more than 4gigs of RAM will make loading your MBP on startup twice as slow - at least a minute, probably longer. That's why a MBP user with extra RAM should sleep their machine nearly always when not in use, rather than powering off. 
    I did not know this, I just upgraded from 4gb to 8gb the other day. Have not noticed it being slower, but I don't often shut it down. It's nice to not even have to bother with ifreemem.
    3. Additional storage and RAM will maximize the basic capabilities of your MBP, but you won't be able to make a 2.3ghz machine any faster than it already is.
    SSD
    4. I still feel that your iMac will be faster than your prospective MBP. The only way to dramatically increase the speed would be the installation of a SSD drive (like the lauded OWC series). But they're not cheap.
    I don't want to rain on your parade, but want you to get a more realistic idea of your performance.
    I chose a macbook pro, 17" of cause. I use it for gaming. Yes a iMac is better for gaming. But, it's nice to be able to move around. Set up a man cave in the lounge 1 week, or in the bedroom, the next. But you fork out a lot more dosh for that luxury. And yes, not as much power as Poikkeus has said.

  • Image processor script and image interpolation setting (cs3)

    Hi all,
    I'm using Bridge & Photoshop CS3 (mac) to process batches of photographs. I've discovered that the script "Image Processor" does not take into account the "image interpolation" setting of my General Preferences in Photoshop.
    It's very painful, because I cannot use "Image Processor" any longer, as it produces soft images where I need sharp ones (my default for "image interpolation" is "bicubic sharper".
    Any idea/workaround?
    thanks
    Patrick

    This is the change I made in CS5 fit image
        // resize the image using a good conversion method while keeping the pixel resolution
        // and the aspect ratio the same
        //app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBIC); Commented out JJMACK
        if ( newWidth > app.activeDocument.width || newHeight > app.activeDocument.height ) {
            if (!limit) {app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBICSMOOTHER);}
        else { app.activeDocument.resizeImage(newWidth, newHeight, resolution, ResampleMethod.BICUBICSHARPER); }
    Note: Adobe choice to use BICUBIC is probally the best choice for users in general. For I find an images has been sharpened before its downsizes, downsizimg it using BICUBICSHARPER  is not the best choice then.

  • 2009 Mac Pro 8-core shut off randomly, won't restart. Swapped processor board and HDD's into my other tower. Started fine and worked for about 10 minutes, then same thing. Powered off by itself and won't restart.

    Both towers are 2009 models, one is 8-core, the other 4. I figured the problem was with the power supply, so I just stuck the guts from the 8-core into the 4-core. It booted up with no issues at all, didn't require any updates or anything. Firefox even restored my tabs. But after about 5-10 minutes, the machine shut off at random and won't start back up. The DIAG LED lights up one LED yellow when pressed, labelled "5V STBY". Same LED on both boards.
    Any ideas? I've got two really expensive paper weights at the moment, and my AppleCare plan expired 3 months ago.

    Dust VAC for dust bunnies
    real issue can be thermal paste or lack or needing redone
    dust clings to any ram or electronics or inside psu and graphic cards
    motherboards both support dual processor?
    thermal sensor readings from Hardware Monitor would be nice
    unplugged is not enough to reset the SMC, power on button also, and every cableetc disconnected
    try with one dimm too

Maybe you are looking for

  • Java.lang.Runtime.exec problem in ubuntu 9.10

    Hi: I tried to run some command in the java code , for example "grass64 -text /home/data/location", this command works well in the terminal, however when I call it in the java code I got some excepetions. My code is : public class Grass {      public

  • Deleting Duplicate entries from Internal tbale

    Hi All, I have used this code to delete duplicate entries from an internal table.   DELETE ADJACENT DUPLICATES FROM IT_KOSTL COMPARING KOSTL hours. After this statment, still the internal table will remain with a duplicate row. Earlier table content

  • Why doesn't iChat connect most times?

    Whether open already but not connected. Or. Opening MacBook Pro and launching iChat. Or opening computer from sleep, hitting command L to conect. All of these ways of trying to use iChat only makes iChat just hang. if I force quit, then the only way

  • How can I get my "My Passport for Mac" to work on OS Lion?

    I recently upgraded to OS X Lion, and everytime I try to open WD Smartware to back up my computer, it crashes. Is WD or Apple working on a fix, or am I going to have to buy a new external harddrive?

  • Master record in MM

    what are the master record in MM other than material master and vendor master?