How to judge required PC power for an application?

Discussion in 'Programmer's Corner' started by SmokeReleaseAgent, Jan 25, 2013.

  1. SmokeReleaseAgent

    Thread Starter New Member

    Jan 4, 2013
    5
    0
    Hi,
    I am trying to figure out how to create a specification for a PC which will be able to run my application, but not be way over the necessary price point and capability for the PC. First, I am not a software engineer, but I did stay at a holiday inn last night, so I think I can do this! I've done some searching on the web and haven't come across the answer. We may hire an SE to rewrite the effort, but I still want to have an idea what the SE is talking about.

    As an illustration, the basic requirements I have are it controls a data acquisition card (DAQ), generates signals with the DAQ, digitizes signals with the DAQ, sends out digital control signals with the DAQ, it monitors a temperature logger, does various FFTs and displays plots and saves data. Right now the code is all proofed up with Matlab m code since that is what I've used the most. During the proofing I ran into problems with the system not being able to create plots and generate the signals. Some how the system would starve the DAQ signal output (buffer of the samples) after running for a period of time and the signal output would shut down. At first it was a problem with the National instruments DAQ driver, which they fixed. Then it would still exhibit the same problem, but now it would just eventually starve the signal buffer. Through a lot of work, I went to another method of creating plots with matlab instead of just using the plot command and was able to keep the system running. I also had access to a big GPU card which allowed even more expansion. I still have not been able to pin-point exactly what limit I'm running into, memory, CPU, bus bandwidth or what the problem is exactly.

    Most of the above is an illustration of how I've run into problems. I'm sure this is not an simple question to answer, but how does a real software engineer decide that XX level PC has enough memory-CPU-graphics to handle the application they're writing and then write a specification/requirement for it? How do I decide that I need an I3 or I5 processor type of calculation? Does anyone have a reference they can point me to? Are there tools expansive enough to be able to monitor the system I am using now to decide that am up against some limit it has?

    thanks
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You do know that a PC running Windows is not by any change a real time system. Also what is your sample rate, and how often do you update your screen output. A common beginner mistake is to say use 1KHz sample rate. Read a single sample each time then update the screen with the same interval with a lot of charts. You system will work much more smooth if you work on data that comes in chunks. Then it comes to screen updates keep to around 25 updates pr second. The human eye is so slow. That 25 updates pr second will look like reel time.
    I have worked a lot with Labview. And even 10 to 12 years back in time. It was no problem working with 5 analog channels of 10KHz data rate. And at the same time doing saving and charting plus some other things
     
  3. SmokeReleaseAgent

    Thread Starter New Member

    Jan 4, 2013
    5
    0
    Thank you for your input -
    Actually updates are done slowly to the screen, but measurements more frequently. We update the screens ~ 10 seconds, but make measurements < 1 second (sample rates below). Part of the problem was we would hold the data in memory and it would get replotted with the new data added rather than updating with new data, which over a period of time seemed to cause a problem. Changing to updating really solved our problem, but I have yet to be able to monitor the offending parameter. Using programs such as GPU-Z, all the windows system monitors, I could not see any parameter (ie memory, GPU use, CPU use, etc) which I could tell was nearing a problem level. Matlab itself will also provide it's view of the system memory, but it provided no answer.

    Our ADC and DAC run at 500KHz and 1MHz respectively (even reducing these didn't seem to help). The data is transferred back and forth through the USB bus to be processed by the CPU. It could be the USB bus is our problem, though NI and Matlab didn't think it was. (I've got the same DAQ in a PCI format to try.) I don't know how to monitor the capacity of the USB bus verses what I'm sending/receiving through the pipe. All of these buses have lots of communications bandwidth requirements, which are not the data of concern, but ensure the bus operates properly. Is there a real time monitor which would provide detailed info on the USB bus capacity at any time (initially all of this was run on a laptop, which is why USB was used)? It would be nice to be able to measure what is happening, rather than just calculating it and possibly making a mistake in my calculation.
     
  4. SmokeReleaseAgent

    Thread Starter New Member

    Jan 4, 2013
    5
    0
    Are there no good tools to monitor the capacities of buses in PCs? Is there no method for predicting computer/micro requirements according to the final predicted software application? There has to be good methods because pic-s and 8 bit micros are so limited in capacity.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I could be that Matlab is not the optimal tool for such job. Matlab will always be a tool geared more in the simulation direction. Tools like Labview would probably be more suited for a job like yours.
     
  6. SmokeReleaseAgent

    Thread Starter New Member

    Jan 4, 2013
    5
    0
    Well, from a labview direction, isn't there still a limit to the ability of a PC to handle a particular task, system, sequence? Does labview have a tool to predict what PC is required for an application? It could be rewritten in labview or any language since it is prototyped in Matlab. Does labview predict the required computing abilities for a PC? I also need to write a spec for the PC. It may very well get rewritten if it's justified.
     
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Running Matlab and Labview concurrently eats a good deal of resources.

    You can download "Process Explorer" from Microsoft, which shows all the running processes, how much memory I/O they use, and disk I/O. It doesn't show PCI activity, but that can be figured out based on how fast you are writing, and what the display adapter is using for traffic (Relatively low for 2D, very high for 3D rendering).

    If this is to be a standalone system, you'll want a real time capable OS, ask what is suggested by the manufacturer of the Data capture cards.

    A standalone ARM 32 bit processor can be quite effective, but involves a lot of code for a custom application, data calculations, user interface/display, as well as bus communication.
     
  8. SmokeReleaseAgent

    Thread Starter New Member

    Jan 4, 2013
    5
    0
    When you say, "If this is to be a standalone system, you'll want a real time capable OS", like VXWORKS or QNX? Could you enlighten me some as to why it would need be RTOS? I am reading your email and guessing that would be for our own micro computer development? I was hoping we'd be able to use a regular computer... That is what we use now.

    Thanks for the pointer to the tools!
     
Loading...