[SOLVED] FFMPEG Using Only 1 Thread

Greetings,
I am having a problem that is killing me. I am using ffmpeg-svn from aur, with "-threads 8" on a core i7 and ffmpeg is only using 1 thread. It doesn't matter if I use ffmpeg from extra or "-threads 0". The commands I am using are:
ffmpeg -y -i movie.h264 -pass 1 -vcodec libx264 -vpre fast_firstpass -b 8192k -bt 1024k -threads 8 -r 24000/1001 -f rawvideo -an -ss 00:30:00 -vframes 2000 /dev/null
ffmpeg -y -i movie.h264 -pass 2 -vcodec libx264 -vpre fast -b 8192k -bt 1024k -threads 8 -r 24000/1001 -an -ss 00:30:00 -vframes 2000 movie.mp4
ffmpeg version:
FFmpeg version SVN-r24856, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 20 2010 21:41:07 with gcc 4.5.1
configuration: --prefix=/usr --enable-gpl --enable-version3 --enable-libmp3lame --enable-libx264 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-postproc --enable-shared --enable-pthreads --enable-x11grab --enable-libvpx --enable-libvorbis --arch=x86_64
libavutil 50.24. 0 / 50.24. 0
libavcore 0. 6. 0 / 0. 6. 0
libavcodec 52.85. 1 / 52.85. 1
libavformat 52.78. 3 / 52.78. 3
libavdevice 52. 2. 1 / 52. 2. 1
libavfilter 1.37. 0 / 1.37. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Where movie.h264 is a raw stream demuxed from a bluray m2ts file. Transcoding HD video with one thread is unbearable. Has anyone else ever had this problem?
Last edited by demizer (2010-08-21 06:16:33)

http://aur.archlinux.org/packages.php?ID=5553
DrZaius wrote:The ./configure option '--enable-pthreads' is redundant because it is now detected automatically:
$ ./configure --help | grep pthreads
--disable-pthreads disable pthreads [auto]
Maybe the package in extra also needs updating, maybe you don't need to explicitly tell ffmpeg how many threads to use and it gets confused.

Similar Messages

  • Bridge is slow because it's only using two threads

    I'm finding that Bridge (CS6) exhibits very poor performance when building 100% previews, I think the software is limited to only two threads.
    If you load bridge and go into a folder with some images and then Tools->Cache->Purge you'll see that Bridge takes a long time to rebuild the previews even on a high end machine, especially if you have both "Always High Quality" and "100% Previews" selected. I think the problem is that it appears to build the previews using only two threads on the CPU, so while a 2005 dual core machine might get maxed out, a Quad Core, or 8 Thread, or even 12 Thread machine sits there mostly idle while Bridge grinds away for an hour or more.
    It's easy to check this, just load up Windows Task Manager, and view the "Processes" tab and Bridge will only ever use 2 threads worth of CPU cycles, i.e. 50% on a Quad Core, and 17% on a 12 Thread high end desktop. I've seen the problem with JPG files, PSD files, and NEF files (Nikon RAW). The processing time of large Nikon D800E NEF files is very slow. After shooting 900 images I can expect the preview build time to take over an hour on a super high end machine with loads of memory, storage IO, and CPU cores and threads, all because it appears bottlenecked on software design. Meanwhile the machine is only running at roughly 20% utilization, the memory barely used, and the IO system close to idle.
    I'm using Windows 7 Ultimate 64-bit, 64GB RAM, 12 Thread Core i7 3960X at 4Ghz, two Nvidia GTX470 graphics (in SLI), a 2-way RAID-0 SSD storage array for the OS, and an 8-way RAID-0 SSD array for the photoshop work files. The hardware is clearly not the issue. Although, just to check, I confirmed the same problem exists on a simple Win8 Core i7 system, and a Core i5 laptop.
    Even worse, after waiting an hour to build previews for 900 images (3 seconds each), after adding GPS data, or after making edits in Camera Raw it then needs to rebuild all the previews again, this is understandable, but super fustrating when you know it's not working as fast as it really should be.
    To be clear, I'm not upset it takes 6 seconds per image per thread - there's a lot of work to do, especially with D800 files. But I'm upset that Bridge's software design only uses 2 threads, and thus limits performance to building a preview every 3 seconds, when in fact it could be working 6 times faster on a PC with 12 thread, and I find it shocking that Adobe's latest software wouldn't be optimized for anything more than a dual core CPU, wasn't quad core launched in 2006?
    Roland.
    P.S. for any Adobe Tech's reading - I submitted this under case number 184020852 and there's an attached PDF in the ticket including several screenshots.

    There have been many discussions in Photoshop forum about processor speed and multicores.  I know Bridge is not Photoshop but it may give you some insight as what is going on.  Photoshop has supported multithreading since CS3.  Here is a quote from Adobe Tech Note:
    Photoshop generally runs faster with more processor cores, although some features take greater advantage of the additional cores than others. There is a law of diminishing returns with multiple processor cores: The more cores you use, the less you get from each additional core. Therefore, Photoshop doesn’t run four times as fast on a computer with 16 processor cores as on a computer with four cores. For most users, the increase in performance that more than six cores provides doesn't justify the increased cost.
    I run embedded thumbnails (therefore 100% previews are off) as they take up less space and are the fastest to load.  I ran a simple test with Bridge CS5 (32 bit) and CS6 (64 bit) on one folder of 200 video images totaling 16 gigs, or 80 meg per file.  With folder loaded I clicked Tools/Cache/purge cache for xxx folder.  I then timed the rebuild until the arrow stopped spinning in lower left hand corner.  For CS5 the time was 35 seconds.  For CS6 the time was 72 seconds. 
    I then took a folder of 1147 jpg images of 660 meg (427k/image).  In CS5 it took 12 seconds to build the cache, and the same for CS6.  However, the interesting part of this is when I loaded this folder in CS6 I had never been there before so it had to build it.  THis took 80 seconds.  When I purged it an it rebuilt it took 12 seconds.  I have noticed this phenomemum before where the initial build takes 5-7 times longer than a rebuild of the cache.
    I then ran the same test with the still images with 100% preview and Always High Quality.  With CS5 it took 3 min 30 seconds and with CS6 it took 5 min. 20 seconds.
    So with these very SIMPLE tests I conclude that CS6 has quite a bit slower cache process than CS5.  As we have all learned with buying new products, new and improved does not always mean it is better. 

  • Read Only Threads

    I find it quite annoying the large number of read only threads in this forum particularly as, to my mind, very few of them are of any use. I've suggested over in the Idea's Bank that they could at least be reorganised into fewer threads without the loss of any information.
    It would be nice to have more of our FAQs as read only topics too wouldn't it? Questions that frequently pop up at the moment that I think could use an official response are:
    iPlayer rollout - if we haven't yet got it, when can we expect to have it by?
    Multi-room / multiple vboxes - will it ever be supported, if so when?
    Freeview HD - will we get it, if so when?
    I'm a new customer getting a C03 error - why? how do I get it resolved?
    I'm getting V04 errors - why? how do I get it resolved?
    I've heard about YouView - when's it coming and how does this effect Vision customers?
    Solved!
    Go to Solution.

    Thanks for the suggestions and feedback guys. 
    I've combined some of the sticky threads so there aren't so many at the top, and i'll take a look at your suggestions for the common FAQs around iPlayer, Freeview HD etc with the Vision team.  Agree these will be useful updates for most of you, and i'ill look to get some info posted on these too.
    Thx
    Kerry
    Retired BTCare Community Manager - StephanieG and SeanD are your new Community Managers
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • [JCoAPI] The context with the session id scope type [null] is currently used in thread HTTP Worker

    Hello to all SAP-experts.
    I have an error in SAP CE, and i can see in troubleshooting following information:
    [JCoAPI] The context with the session id [JCo_mMnig6B1YRWfNCWhW0pY0CgFOhzFTAHqyFEA_SAP:P3fshVcB4PLh3CzLBVbpf5lVRxzFTAHqyFEA_SAPyxuggqvaUEsNVbxNQybjvxH0] scope type [null] is currently used in thread HTTP Worker [@1902361406] [0x91].Current thread is HTTP Worker [@1590998042] [0x97].
    invoked at com.sap.conn.jco.rt.Context.checkBusy(Context.java:633)
    invoked at com.sap.conn.jco.rt.Context.getConnection(Context.java:153)
    invoked at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1466)
    invoked at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1437)
    invoked at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:300)
    invoked at com.sap.conn.jco.rt.DefaultRequest.execute(DefaultRequest.java:68)
    invoked at com.sap.tc.cm.arfc2.model.ARFC2GenericModelClassExecutable.executeInternal(ARFC2GenericModelClassExecutable.java:107)
    invoked at com.sap.tc.cm.arfc2.model.ARFC2GenericModelClassExecutable.execute(ARFC2GenericModelClassExecutable.java:68)
    invoked at com.sap.tc.cm.arfc2.gci.ARFC2TypedModelClassExecutable.execute(ARFC2TypedModelClassExecutable.java:54)
    invoked at ru.sng.terminal.utt.terminals.wd.comp.utt_term.Utt_term.loadReasonsToStop(Utt_term.java:1542)
    invoked at ru.sng.terminal.utt.terminals.wd.comp.utt_term.Utt_term.wdDoInit(Utt_term.java:186)
    invoked at ru.sng.terminal.utt.terminals.wd.comp.utt_term.wdp.InternalUtt_term.wdDoInit(InternalUtt_term.java:1054)
    invoked at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:161)
    invoked at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:227)
    invoked at com.sap.tc.webdynpro.progmodel.components.Component.initController(Component.java:258)
    invoked at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:206)
    invoked at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:590)
    invoked at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doPreprocessing(ClientApplication.java:1457)
    invoked at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:660)
    invoked at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:349)
    invoked at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
    invoked at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
    invoked at com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:89)
    invoked at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doGet(AbstractDispatcherServlet.java:55)
    invoked at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    invoked at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    invoked at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    invoked at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    invoked at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:457)
    invoked at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
    invoked at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
    invoked at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
    invoked at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    invoked at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    invoked at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    invoked at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    invoked at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
    invoked at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
    invoked at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
    invoked at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    invoked at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    invoked at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
    invoked at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
    invoked at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    invoked at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    invoked at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    invoked at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Please, tell how can i solve this problem ?

    Hi Konstantin,
    it has nothing to do with the number of system threads. You are obviously executing several function modules statefully in multiple threads within the same session context. Stateful requests can only be executed in an ordered manner in case they should belong together. You are using ARFC2, which is part of the WebDynpro runtime. In case you are sure that the calls are independent from each other, it might be a good idea to adjust the scope type of some of your bindings. Then the requests will be executed with different scopes depending on your configuration and you can execute them concurrently
    Best regards,
    Markus

  • How can i use only black cartridge for printing documents

    i have today installed hp 1510 all in one printer, it uses ink from the both cartridges i just want to use black ink for printing documents, how can i do that
    This question was solved.
    View Solution.

    Hi @sandeepv 
    I can help you with your print settings, so the printer will print black and white only.
    If you have a Mac operating system, use the instructions below.
    Printing with the Black Print Cartridge Only option
    Click File and then click Print.
    Make sure your printer is selected.
    Verify that the Preset option is set to Standard.
    In the Copies & Pages menu, select Select Paper Type / Quality.
    NOTE:If this option is not available, click ColorSync. Then click the down arrow beside Quartz Filter and change the setting from None to Black & White.
    Select the Paper tab.
    From the Color option menu, select Grayscale.
    Select the Color Options tab.
    Select the Black Print Cartridge Only option.
    If that option is not listed, then it is not available. The printer will print using only the black cartridge, however, printing with one cartridge will be slower than printing with both cartridges.
    NOTE:To save the setting, click the arrow next to Preset and select Save As. Save the Preset option as Black Cartridge Only and then click OK. Then, the next time you want to print with just the black cartridge, select the Black Cartridge Only Preset.    -Source
    If you are using a Windows operating system, use the instructions in the following link. Although this document is titled Changing Print Settings in Windows 8 it can be used for other Windows operating systems. The navigation from Windows 8 to older Windows operating systems would vary, please let me know if you are using a different operating system and/or if you require additional assistance.
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Is it possible to use *only* voice control - no keyboard or mouse at all?

    Short story, hope you can bear with me.
    I have a client who was using Windows for years. He has some disability that means he really can't use a mouse or keyboard. He has been using Dragon Naturall Speaking for about 5-7 years *on Windows*. He also has a Wacom tablet, but uses it sparingly.
    About 6 months ago, he was having problems and was fed up with the problems he was having on his Windows machine. He called me and said "That's it. I'm going to Mac." He bought an iMac the next day, about two weeks before Lion was released. He had also purchased Dragon Dictate for Mac.
    I set it all up, installed it and he was ready to start training Dragon.
    A few months later, he calls and says, "I need to install Windows on my Mac because the Dragon Dictate for Mac is useless. I've spoken to them and they admit that there are several things you just can't do. Like moving the mouse." I think he means things like dragging an item into another folder, or drawing a box around several items on the desktop in order to trash them or copy them or drag them into an email as an attachment, etc. I keep asking him to be more specific, but all I can really get is that It. Can't. Be. Done. On. A. Mac.
    And that, of course, really makes my skin crawl. I mean, come on, it's a Mac. They have *great* features for Accessibility. Surely, this must be a solved problem.
    But, I have looked. I looked at the additions in Lion. I looked at the literature for Dragon. I have tried to do it myself on my computer. So far, I'm stumped.
    I understand that there might be a learning curve, such as learning to say *where* you want something to be dragged to, instead of actually dragging it there visually. "Move selected document to Documents" and so on. But, I'm still hard pressed to find a way to do *every*thing (or a 99+%) using only voice control.
    Does *any*one have any ideas, suggestions, thoughts, solutions?
    His solution? He bought a used Windows computer today. I've copied (again) all his data from his iMac back to the Windows PC and installed Dragon Naturally Speaking, etc.
    Surely, this can't be the only solution. There *must* be a way to do this on the Mac. Right?
    Thanks.

    Hi again,
    I checked the Bios of my neighbors A100, so he has no option for Wake-on-Keyboard, too. I think its not implemented in that bios.
    If this helps you: try the latest bios for that machine, maybe the implemented that option in a newer version.
    Greets man

  • New Discussions: for day time use only? (-: A darker blue, please!

    Thanks a lot Mods for your efforts.
    I spend some time on these boards every day, so I can see things are going better and better.
    I like the new Discussions better than the previous, especially everything that comes with this new ability to put much more on one page (like being able to see A LOT (not only five) of "Recent topics in this category", or that the topic's titles can be longuer than before, or being able to read the whole thread without jumping to "the next 15 posts" like before. I set "My Posts" to "50", this too was not possible before. Etc.)
    Now my request:
    At first I thought, like many others, that the "blue dot" and the "blue half-dot" were too small, and that we couldn't see the small grey "New!" because it was not red.
    Now after all this time since Nov14, I finally understood what was wrong, because
    (1) the new kind of eye fatigue I didn't experienced before, and
    (2) a change in my computer's room lighting configuration.
    The real problem is not the blue dot size (altough I'm sure if it was a square it would work better), it is its environment.
    We have a white line after a light blue line, and this is a great feature to differenciate between topics. Works great within a thread too, to differenciate posts.
    But one side effect of this is that the whole page "feels" slightly blue.
    I'm not sure, but a human eye physicist could perhaps explain another kind of (more insidious?) side effect caused by the alternance of lines. Perhaps depending on which color are chosen for them?
    Anyway, there is no problem with a page that "feels" blue, when the text is black.
    The problem starts when the text ALSO is blue. Especially light blue...
    I find the text blue color too light. Even the "visited link" purple is too light.
    Given that the background is blueish, I mean. Otherwise it'd be fine.
    This was not easy to understand, because the [defect/effect] is not obvious: the overall picture is nice.
    But it became obvious to me when I saw that I have no problem IF I set my screen's brightess to "very bright".
    New Discussions: for day time use only?
    ==> Please, would it be a problem (or too difficult to set perhaps?), to try a darker blue text for two or three weeks, see if we like it better? (along with a slightly darker purple for the visited links).
    Thanks again for all the great work!
    Axl

    Hi Axl,
    Some one had posted this about color,I do not remember who,sorry.
    I thought it was interesting.Hopeful this color issue can be alter but deepening the colors as you & many have requested.
    http://www.grc.nasa.gov/WWW/usability/colorcss.html
    Good luck, Eme

  • Why use only 3gb ram when instaled 4 gb?

    why use only 3gb ram when instaled 4 gb??
    macbook 2,1 late 2007 mac os 10.6.8
    Название модели:    MacBook
          MacBook2,1
          Intel Core 2 Duo    2.16 ГГц
    RAM:   4 ГБ  667 МГц
      Версия Boot ROM:    MB21.00A5.B07
      Версия SMC (система):    1.17f0
        UUID     00000000-0000-1000-8000-001B6335F21C
    < Edited by Host >

    already read the threads about memory limitations,
    the snow leopard limitation has not been withdrawn, and the Mac OS Lion restriction will be removed? or not?

  • Second mac in cluster uses only one core

    Hello all. For some reason the second computer in my render farm is using only one core out of eight.
    I'm using 2 Mac Pros linked together directly via giga ethernet wire. Mac one is a Quad Core 3ghz. Mac two is a Octo Core 2009 model. Both computers have the same version of FCS3 with different serial numbers.
    In the Qmaster preferance pane: Mac one is set to "Quickcluster with services" with the check boxes for Share and Managed next to "Distributed processing for Compressor" checked. 4 instances selected and "Include unmanaged services from other computers" checked. Mac two is set to "Services only" with check box for Share next to "Distributed processing for Compressor" checked. 8 instances selected and "Include unmanaged services from other computers" checked.
    I hit submit in Compressor, select the name of the cluster from Mac one, then in the Batch Monitor I see the video divied into 10 sections with Mac one handling 4 and Mac two handling one. On Mac two I see that the cores aren't fired up 100%, more like 30% on average.
    I did a test earlier with a dual core mbp, and again only one core. How do I get my Octo core to use all 8 cores?

    Solved the problem. The solution was simple, but somehow went under my radar. On Mac two in the Qmaster preferance pane next to the "Options for selected service" button, the selected service was set to off.
    Duh

  • How can i use multi threading in labview?

    i want to run a Digital storage oscilloscope and an energ ratio meter simultaneously using labview. i am using GPIB interfacing and windows XP. how can i do this using multi threading. Bot the instruments shd run and give data at the same time.

    You can't do this - at least not with a single GPIB board. It has nothing to do with threading or LabVIEW. There can only be one talker at a time over the bus. Depending on the instruments, you could probably set them up to take measurements simultaneously but you have to sequentially poll them to get the data.

  • Interpretation of the use of threads with Sessions in the JMS Specification

    Hello,
    I’ve been interacting with two JMS Providers which do a different interpretation of the JMS Specification with the use of different threads for accessing to a session and session’s related objects.
    The question is:
    When a client is consuming messages asynchronously, is it possible to access session’s related objects from a thread different to the one dedicated to the asynchronous consumption, on (thread of control)?
    -     Never?
    -     Yes, but the client should provide explicit synchronization.?
    Our execution scenario is:
    1.- Messages are consumed asynchronously from a dedicated thread.
    2.- From other thread, messages consumed are acknowledged.
    In the JMS specification there is, at least, two parts where this issue is treated:
    1.- The first one (4.4.1 - page 60):
    +“There are no restrictions on the number of threads that can use a Session object or those it creates. The restriction is that the resources of a Session should not be used concurrently by multiple threads. It is up to the user to insure that this concurrency restriction is met. The simplest way to do this is to use one thread. In the case of asynchronous delivery, use one thread for setup in stopped mode and then start asynchronous delivery. In more complex cases the user must provide explicit synchronization.”+
    This extract, makes me think that it is possible the access from different threads, but If I do that, I should provide explicit synchronization.
    2.- The second one (4.4.6 – page 62,63)
    +"Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it. It is erroneous for client code to use this session or any of its constituent objects from another thread of control. The only exception to this is the use of the session or connection close method"?+
    This extract, could be interpreted as that the concurrent access is never allowed in the described situation.

    I think the key words are in 4.4.6 (and also the javadoc for Session): "Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it".
    My interpretation of this is that you when you register a message listener and call connection.start(), the thread which delivers messages to the listener should be thought of as "using the resources of the session" (as mentioned in 4.4.1) continuously until the connection is stopped (or until the session or connection is closed). it doesn't matter whether the session is executing onMessage() or not.
    Given this, both 4.4.1 and 4.4.6 say the same thing: that once you have registered and started a message listener, the only thing you can do to the session from another thread is to close it.
    I agree the spec could be clearer. In particular the words "In more complex cases the user must provide explicit synchronization" in 4.4.6 should be clarified to state what this actually means rather than give a hint.
    Please note that work has just started on updating the JMS specification, so now is a great time to report areas of the JMS spec which would benefit from clarification. If you'd like this to be considered for clarification, please report it in the official JSR 343 issue tracker at http://jms-spec.java.net
    Nigel

  • Is it possible that my update stats used only correct tables?

    Whenever there is a schedule maintenance run I receive a error:
    Executing the query "UPDATE STATISTICS [Perf].[PerfHourly_F65954CD35A54..." failed with the following error: "Table 'PerfHourly_F65954CD35A549E886A48E53F148F277' does not exist.". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly.
    Is it possible that my update stats used only correct  tables?
    Thanks

    Use below script ...(change if required)
    USE [dbname]
    go
    DECLARE @mytable_id INT
    DECLARE @mytable VARCHAR(100)
    DECLARE @owner VARCHAR(128)
    DECLARE @SQL VARCHAR(256)
    SELECT @mytable_id = MIN(object_id)
    FROM sys.tables WITH(NOLOCK)
    WHERE is_ms_shipped = 0
    WHILE @mytable_id IS NOT NULL
    BEGIN
     SELECT @owner = SCHEMA_NAME(schema_id), @mytable = name
     FROM sys.tables
     WHERE object_id = @mytable_id
     SELECT @SQL = 'UPDATE STATISTICS '+ QUOTENAME(@owner) +'.' + QUOTENAME(@mytable) +' WITH ALL, FULLSCAN;'
     Print @SQL
     EXEC (@SQL)
     SELECT @mytable_id = MIN(object_id)
     FROM sys.tables WITH(NOLOCK)
     WHERE object_id > @mytable_id
      AND is_ms_shipped = 0
    END
    Or use below for required table only but it will not execute only generate script, make change as per ur requirements:
    SELECT X.*,
      ISNULL(CASE
        WHEN X.[Total Rows]<=1000
        THEN
          CASE
            WHEN [Percent Modified] >=20.0
            THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name] + ' WITH ALL, FULLSCAN  --20% Small Table Rule'
          END
        WHEN [Percent Modified] = 100.00
        THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  --100% No real Stats Rule'
        --WHEN X.[Rows Modified] > 1000
        --THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  --1000 Rows Modified Rule'
        ELSE
          CASE
            WHEN X.[Total Rows] > 1000000000 --billion rows
            THEN CASE
                   WHEN [Percent Modified] > 0.1
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 1B Big Table Rule'
                 END
            WHEN X.[Total Rows] > 100000000  --hundred million rows
            THEN CASE
                   WHEN [Percent Modified] > 1.0
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 100M Big Table Rule'
                 END
            WHEN X.[Total Rows] > 10000000   --ten million rows
            THEN CASE
                   WHEN [Percent Modified] > 2.0
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 10M Big Table Rule'
                 END
            WHEN X.[Total Rows] > 1000000    --million rows
            THEN CASE
                   WHEN [Percent Modified] > 5.0
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 1M Big Table Rule'
                 END
            WHEN X.[Total Rows] > 100000     --hundred thousand rows
            THEN CASE
                   WHEN [Percent Modified] > 10.0
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 100K Big Table Rule'
                 END
            WHEN X.[Total Rows] > 10000      --ten thousand rows
            THEN CASE
                   WHEN [Percent Modified] > 20.0
                   THEN 'UPDATE STATISTICS ' + [Schema Name] + '.' + [Table Name]     + ' WITH ALL, FULLSCAN  -- 10K Big Table Rule'
                 END
            END
      END,'') AS [Statistics SQL]
    FROM (
    SELECT  DISTINCT
            DB_NAME()   AS [Database],
            S.name      AS [Schema Name],
            T.name      AS [Table Name],
            I.rowmodctr AS [Rows Modified],
            P.rows      AS [Total Rows],
            CASE
              WHEN I.rowmodctr > P.rows
              THEN 100
              ELSE CONVERT(decimal(8,2),((I.rowmodctr * 1.0) / P.rows * 1.) * 100.0)
            END AS [Percent Modified]
    FROM
            sys.partitions P
            INNER JOIN sys.tables  T ON P.object_Id = T.object_id
            INNER JOIN sys.schemas S ON T.schema_id = S.schema_id
            INNER JOIN sysindexes  I ON P.object_id = I.id
    WHERE P.index_id in (0,1)
      AND I.rowmodctr > 0
    ) X
    WHERE [Rows Modified] > 1000
    ORDER BY [Rows Modified] DESC
    Please click "Propose As Answer"
    if a post solves your problem, or "Vote As Helpful" if a post has been useful
    to you

  • Can I print on a Canon MP480 using only a black ink cartridge?

    Hi BKJen, Both ink cartridges are required to be installed in the printer in order to print, even if one of the ink cartridges are low or out of ink. If you are receiving a low/out of ink warning and need to continue printing, you can disable the ink level detection function of the printer by pressing and holding down the Stop/Reset or Resume/Cancel button on the printer for at least 5 seconds, then releasing it.  Once the low/out of ink cartridge is replaced with a Canon genuine ink cartridge, the ink level detection function of the printer will be re-enabled. You can also set the printer to print using only the black ink cartridge from within the printer driver on your computer. If you would like instruction for doing this, please reply with what operating system is on your computer (version of Windows or Mac OS X), and we'll be happy to assist you.

    Hello @downeyke , and welcome to the HP Forums!
    I understand you are looking into black ink options.  I would love to try and help you, but I do need a little information first. I am linking an HP Support document below that will show you how to find which version of the Mac operating system you are using.  With this information we can provide you with accurate information.
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    Please let me know what you find.  Thanks for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Database uses only one cpu core  from 16 available

    Hi,
    we have an server with 16 CPU cores, and we discovered from em that it uses only 1 core with 100% and the others are idle.
    the initialization parameters for CPU are:
    cpu_count 16
    parallel_threads_per_cpu 2
    resource_manager_cpu_allocation 16.
    What can we do to use all 16 cores.
    Regards
    Nicoale Ancuta

    Nicolae Ancuta wrote:
    Very interesting poit of view, but since I have for some period of time 1 core on 100% and other cores are idle or 0%,
    I don't think that we can say that linux and oracle database 11g is using the best from that server, can you?Well, I did not offer a point of view. I offered fact - a reason why on x86 architecture it is faster to keep threads on the same CPU (if sufficient CPU capacity) then run such threads across CPUs.
    As for what you are seeing - we cannot see it. So the only data we have is what you offered. And that does not suffice in making any kind of call as to why you are seeing, or even describing the symptoms correctly.
    Why don't you try another example? 3 client server applications. Each client post a request (huge update 100% CPU, small update 0% CPU, huge select 100% CPU). What the server does, it switches between those 2 huge requests an uses only one core on 100% abd the others 15 are sleeping. Why don't use each request on different core and reduce the time?Define "+huge request+". Database operations are typically I/O intensive - not CPU intensive. There are also a number of processes. So if PMON for example is showing high CPU, then that means something different as when DBWR is showing high CPU, versus a dispatcher process showing high CPU.
    So you need to provide a lot more detail for us to speculate as to what the problem could be, never mind offering a solution.

  • Suddenly my mac uses only all caps and I can't restart, please help!

    Suddenly my mac started using only 'all caps', and also 'select all' with 'left click' in both iTunes and Chrome. I tried to restart, but it will only attempt to open in safe mode, and it will not accept my password. I assume this is because it will only type in capitals, so I cannot get in at all, even with my OS disk.
    This is not because of the caps lock button. I tried this many times. My cat may have walked on my keyboard though. When this happened, I was copying unlinked descriptions from Chrome to iTunes podcasts. I have shut down to restart several times, and my new wired aluminum keyboard is 4 weeks old.
    About 3 weeks ago I did a complete erase of my hard drive and installed snow leopard and iWork 9 from disk, updated them, and only added my documents back on from a bootable backup. Then I downloaded Lightroom 4, and imported a few thousand photos from an EHD. My iTunes library is on a seperate EHD. Everything has worked perfectly until now. I do have a recent Time Machine backup. My APS uninterruptable power supply is about 2 weeks old.
    What can I do now?
    Message was edited by: mahtia

    Problem solved, it was my new mac keyboard, only four weeks old.
    My old mac keyboard works fine except for the row of keys on the far right,
    which is why I got a new one.
    Hard to believe a bad keyboard could mess up a mac that badly!

Maybe you are looking for

  • Geospatial Registration Tool Missing from Acrobat 9 Pro

    I'm running Acrobat 9 Pro for Windows and am trying to georegister a PDF, however when I bring up the Analysis toolbar there are only three tools: Object Data Measuring Tool Geospatial Location Tool The fourth tool (the Geospatial Registration Tool)

  • File size (using java.io.File)

    Hello all, When I want to create an app to be used as file browser, I should like to know the size of a file in a directory. The java.io.File class gives me quite some functionality, but not the functionality to display the file size. Does anyone kno

  • Contribute CS4 Crashes Using Vimeo Links

    We recently started posting videos on Vimeo and tried to add links on our website (using Contribute CS4).  We can create a link to any Vimeo page but then Contribute will crash when editing any text or when looking at the properties of the hyperlink.

  • TS3297 i cant connect to itunes as an error code 37 keeps appearring

    hi i need some help to get my itunes working.an error 37 code keeps coming up and ive tried everything m ipad 2 and my iphone 5 are not working

  • Image shadow in crystal report

    Hello expert: in my crystal report, there are a few images, but those images are attached with light grey shadow in following situcations: (1) when I export this report into PDF file from CR 2008 (2) when I display this report in infoview (3) when I