Programming :: Will Multi-Threading Improve Performance?

May 18, 2011

So I have built a program that takes a picture from two cameras every second and converts them both to jpeg format. The problem is that currently it takes ~2 seconds to convert a single raw photo to jpeg format, thus every second I add another raw photo (30 MB) to ram waiting to be converted to jpeg. So, theoretically the conversion to jpeg is running on a single core with hyperthreading, would I see better performance running the exact same process (a program pulling from a queue and converting to jpeg) running as a single process, or two concurrent processes? (both processes running on the same core, (so 1 thread on one clock cycle, the other on the other... (or one thread running on 1 core and the other on another core. What other steps would you take to improve the performance so there would no longer be a race condition?

-Currently using QT

View 5 Replies


ADVERTISEMENT

Programming :: Read Tutor About Multi Threading, But Not Getting Correctly

Mar 1, 2010

I am new to Programming. I would like to learn some multi threading in C. how to start. I read tutor about multi threading, but not getting correctly.

View 2 Replies View Related

Fedora :: Mplayer Builds With Video Acceleration And Multi-threading Support?

Sep 4, 2009

I thought this may be of interest, so I'm sharing. I've built some experimental mplayer packages for Fedora 11 and Rawhide (x86-32 and x86-64 arches) with shiny new features. Aside from being very recent snapshots, one of them includes support for hardware video playback acceleration via VDPAU and VAAPI, and the other includes support for multi-threaded playback (so you can split the decoding load across multiple cores).

The playback acceleration can definitely be used on NVIDIA adapters (from the GeForce 8xxx series onwards) using the proprietary driver (not, unfortunately, nouveau). Also on Intel Poulsbo (GMA 500) adapters, using my packaged version of the native driver for that chipset (link is in the blog post). VDPAU acceleration is also allegedly possible on S3 Chrome 530 GT and S3 Chrome 540 GTX adapters using S3�s own driver, but I haven't had the chance to test that. Multi-threaded playback can be done on any system, but only really makes sense on those with multiple processors (cores).

Full details of where, how and why are in my blog post:[URL]..

View 14 Replies View Related

Red Hat :: TCL With Non-threading / Error This Version Of TCL Was Compiled With Threading Enabled?

Sep 13, 2010

I am trying to stand up an IDS box based on RHEL 5.

When I issue the command ./sguild I get the following response:

ERROR: This version of TCL was compiled with threading enabled. Sguil is not compatible with threading.
SGUILD: Exiting.

View 4 Replies View Related

Ubuntu :: How To Improve System Performance

Jun 4, 2011

Basically I'm wondering if there is any way to lighten Gnome and Ubuntu I would like to keep Gnome if possible. I am a pretty experienced linux (or for you hardcore GNU fans GNU/Linux) user having used it for almost 4 years and I just built my Arch system but have found that alot of the functionality that I've come to love about ubuntu isn't in the default Gnome package but that Ubuntu's Gnome is heavily modified so I want to switch back but do to my lack of modern hardware I can't run Ubuntu as smoothly as I want.

Below is my current hardware.
Code:
Intel Pentium III 733mhz
512mb of ram
8gb Hard Drive
and a Dvd Drive
Nvidia Geforce 6600 265mb pci gpu
100 watt power supply

I am also a Developer so I know I can compile the Kernel my self and remove some not needed junk and optimize it. But I was wondering are there some Highly intensive processes that don't really need to be running? The only thing I would be using Ubuntu for is Web Browsing, Coding, Gimp, Text Processing and probably Music; thats really all I need I don't do much else besides that.
tl;dr:
Basically all I'm trying to do is lighten Ubuntu and Gnome without putting 3 days worth of work into it.

View 2 Replies View Related

Ubuntu :: VNC And Gnome-rdp - How To Improve The Performance

Sep 1, 2011

I am running a ubuntu desktop machine as a server and use VNC from my windows machine to login via a LAN to the ubuntu machine. The login session is very sluggish and frustrating. I installed gnome-rdp to see if it would be better but I don't know how it works or what to do and if there is something else I can do to improve the performance. I have 3 gig of ram and the server is a dual celeron machine

View 9 Replies View Related

Hardware :: Improve 3d Performance Of X800XL?

Jul 9, 2010

I have got a Radeon X800XL built in my computer. I was able to play Quake 4 in high details once, so I guess my PC is quite fast. Anyway, I have trouble playing Anno 1503 and SuperTuxKart (sic!). While Anno 1503 is fairly unplayable, SuperTuxKart has got around 30 to 90 fps, depending on the situation. In my opinion, that's way to less.

My question is: How could I improve the 3d performance, to be able to play such legacy games as Anno 1503? Therefor I'll give you some information about my configuration and what I tried so far.

I run Ubuntu 10.04. That means, the driver provided by AMD/ATI (fglrx) does not work anymore. My Ubuntu is up to date.

I set the kind of graphics card and the graphics ram in the Registry of Wine. Disabling the compiz-fusion-effects does not improve the situation however.

I disabled KMS. That gave an amazing performance boost, but still not enough. I am still experiencing performance troubles like being unable to play Anno 1503, and some others.

I also created a Xorg.conf, trying to tweak some settings, but that does not improve the performance much. The config file is attached below.

How to improve or accelerate the 3d-performance. Maybe there is an beta-driver or some xorg-settings I did not find?

Kernel:

Code:

View 3 Replies View Related

General :: Improve The Performance Of Script ?

Feb 15, 2011

I have written a script as follows which is taking lot of time in executing/searching only 3500 records taken as input from one file in log file of 12 GB Approximately. Working of script is read the csv file as an input having 2 arguments which are transaction_id,mobile_number and search the log file having these two strings with one more static string that is "CustomCDRInterceptor",then format the searched data in prescribed format.

Code of script written is as follows:

Code:

Sample data of input file will be like :

Code:

Sample Data in log file is as follows:

Code:

View 3 Replies View Related

Debian Multimedia :: Improve Visual Performance ?

Mar 12, 2011

Does anybody know more tips and tricks to increase visual performance besides these?:

Got it from:[url]

The first made minimizing windows a lot quicker.

View 3 Replies View Related

OpenSUSE :: How To Improve Graphics Performance In Xen Guest

May 10, 2011

I was using centos for my business applications and now I am trying to work only with opensuse and install my other oprerating systems in it. I was always using vmware , but I decided to try another virtualization technologies other than vmware for testing , I searched the internet and found many other like virtualbox , kvm , xen. I concluded from my search that xen and kvm will be the faster type , I decided to test them, I choose xen, it is better than kvm. I installed opensuse 11.4 and installed xen hypervisor deployed two VMs windows xp and centos 4.8 , they are runing quite good but I have some questions:

1 : Isn't there anyway to improve graphics performance in xen guest , or change the video card memory or type ?
2 : Isn't there any way to copy and paste between the host and guest ?
3 : Isn't there any free application like vmware tools or virtualbox guest tools for xen ?
4 : I use these VMs to install some applications for my geophysics work which requires good graphic performance in the vm , also I don't them to be sluggish sometimes , which is better for that vmware or xen ?

View 9 Replies View Related

General :: Improve Performance Of Mplayer With Libcaca?

Mar 18, 2011

I'm using mplayer and libcaca on Gentoo. My framebuffer (uvesafb) is running at 1920x1200 (I don't know how many characters that is) and mplayer has problems filling up the screen, so video and audio lose synchronization.

View 1 Replies View Related

Ubuntu :: 10.04 - How To Improve Performance And Fullscreen Video

May 6, 2010

I have a Gateway Laptop which is dual-booting Windows XP SP3 32-bit and Ubuntu 10.04, also 32-bit. The 64-bit version, would not install on my computer, even though the computer has 64-bit capabilities. It doesn't bother me that I use the 32-bit version, but something it is now doing seems to be affecting the way things work on my laptop. The computer has 4GB of RAM in it, an AMD Turion 64 X2 processor, and an ATI Radeon X-series graphics card. The monitor has HDMI capabilities. On the Windows side, it handles full-screen programs and operates very quickly. On the Linux side, I can also run things quickly. However, most programs on the Linux side are much slower-running than they would be on the Windows side.

Something I notice when my laptop goes into fullscreen on the Linux side, is that the color quality goes way down. You can see that it is trying to run in apparently 256 colors, and each individual pixel is very visible. It does not do this on the Windows side. Also, programs that I run on this half of the computer are very laggy, slow, and inefficient. I know that my computer has the video and processing power to handle these programs with ease, but it isn't utilizing all of it. How can I make Ubuntu run at a higher speed overall, by taking advantage of all four gigs of RAM and this 2.4 GHz Turion processor to run everything like Windows does?

View 1 Replies View Related

Ubuntu Installation :: Partition Alignment To Improve SSD Performance?

Jan 2, 2010

I'm trying to do a partition alignment on my main SSD to improve SSD performance and then install Ubuntu on the SSD. I can do the alignment with no problem but when I install ubuntu the alignment is erased. Is there a way to install ubuntu without getting rid of the alignment?

View 2 Replies View Related

Ubuntu Servers :: Setting Up A Cache Improve The Performance?

Feb 26, 2010

dns cache serThis is probably more of a network question but I figured some one who is a network expert might know. Currently my organization has DNS servers. But my questions is would setting up a cache server improve the performance any? When I first thought about it i thought probably not. But since it stores information in ram that made me think maybe it would improve network performance a little.

View 3 Replies View Related

General :: Does Scheduled Reboot Of Server Improve Performance?

Nov 12, 2009

I just want to know if a linux server got rebooted after a scheduled time(2/3 month), whether the performance improves. If improves why.

View 1 Replies View Related

Software :: Get Maximum Performance On A Multi-processor Machine?

Jun 30, 2011

I have a multi-threaded app using pThreads that runs great under Windows on my 4 core machine - all four cores get maxed out processing parts of a large file. I recompiled the same code to run on Red Hat linux on a 64 CPU machine - but from I can tell when it runs - it gets stuck on one core. "mpstat -P ALL" shows the cores are barely loaded. I have tried sched_affinity, sched_priority and SCHED_FIFO - nothing has helped. Any ideas on getting more performance?

View 14 Replies View Related

OpenSUSE Hardware :: Slow Performance With Mutexes And MySql On Multi Core CPU - AMD Phenom II X4 965 - With 11.3

Nov 11, 2010

I have installed OpenSuse 11.3 32 Bit in a virtual machine on an older computer on a Windows XP host and on a new computer with AMD Phenom II X4 965 processor.

With sysbench I tested the performance of mutex and on the new computer it is 3 - 4 times slower than on the virtual machine. Other performance tests with sysbench for CPU, memory and threads are faster on new computer like expected. I tested this, because I have a slower performance of table creation in MySql tested with sql-bench, where creation of 10000 tables lasts 45 seconds on the virtual machine but over 400 seconds on the new computer.

I have tested with kernel-desktop and kernel-default but there are not large differences. File creation was tested with bonnie++ and is on newer computer faster as expected.

My questions are:
- Why is the mutex handling on the multi core CPU slower than in the virtual machine and how to speed up this?
- Or is there another reason why table creation of MySql is so much slower on multi core CPU?

View 7 Replies View Related

Programming :: How To Improve Sed Script To Split File

Aug 26, 2010

If there's another way to improve a script that I have created, since I'm not an expert! It works, and it made what I wanted, but it took a while to do it... maybe it can be improved. Here's the background. I have one file, with 244000 lines, let's call it X. I needed to split it in 1000 files, each one of 244 lines. I also needed the files to have the .arp extension. So here is what I did:

Code:
for i in {1..1000}
do
sed -n '1,244p;244q' X > $i.arp
sed -i '1,244d;' X # in this way I deleted the copied lines each time
done

View 12 Replies View Related

General :: How To Mitigate The Multi-core "performance Penalty"

Aug 20, 2010

I've been doing some computations at home and at work and have noticed some unexpected performance issues. The work machine is quite a bit more "serious" than the home machine, but sometimes the home machine outperforms the work machine. I'm curious what the dynamic is -- why this should be, and if I can tweak it at all.

Ultimately on both machines the computations are just a lot of very large arbitrary-precision integer linear algebra computations (based on the GNU multi-precision library). Reducing a lot of sparse but "large" integer matrices, finding the vertices on the boundary of high-dimensional polyhedra, and so on.

On my home computer (which has two cores), if I run a standard computation on only one core (the 2nd core near-idle), it takes 282s.

On the home computer running two identical parallel computations (the same computation as above), it takes approx 320s on each core.

On my office computer, with all cores essentially idle except for one core running this computation, it takes 196s.

On my office computer, if I have all 8 cores running full-out, and one of the cores is doing the computation above, it takes 356s on the one core that's running the computation.

Here are the details on my home computer:

View 2 Replies View Related

Programming :: Created Python Programs - Making Changes To Improve?

Dec 17, 2008

I have list of programs which I have created during the past few days, all the programs are attached in txt files, and if anyone can do favor, and double check if they work, and what changes I can make to make it look different, or to improve it.

View 9 Replies View Related

Programming :: Lost In Performance Programming With Sdl Instead Of Glx And X11?

Mar 19, 2011

While i was searching the internet google often answered with linuxquestions.org. Now where i cant find an answer through google i thought i'll register myself in here. I used to write some programs in ANSI C, OpenGL and xf86 (X11). Everything is working well. Now i want my programs to run under windows XP/Vista/7 too. As far as i read at LQ SDL is an API which provides me with a window and other stuff i need, like sound. My Questions are now:

Do i have lost in performance programming with sdl instead of glx and x11? How "much" do i lose? Do i get more performance when i program seperate glx/x11 and gl/WinAPI? sure, i have to program each thing twice. like window initialization and keymapping.

View 2 Replies View Related

Programming :: VTALRM In Multi-threaded Programs?

Apr 20, 2011

I ran into an inconsistency in handling timers (VTALRM) between AMD and intel platforms with threads. My understanding was that the timers are per process. I discovered I must call setitimer in the thread on intel though. AMD allows me to make the setitimer call once in the main thread as expected. The code below demonstrates the issue. I must add the code in the INTEL define for it to work properly on intel cpu's. Am I missing something dumb??

[Code]...

View 4 Replies View Related

Programming :: Create A Multi Selection Menu?

Sep 18, 2010

I am creating a program that need menu with multi selection option for shell (CLI).I am using of Bash scripts.something that will look like that:

Menu:
[ ] option 1
[x] option 2

[code]...

View 2 Replies View Related

Programming :: Multi Dimensional (3 Array) In Python

Jul 28, 2010

I do a lot of scientific work - mainly in C/C++ but want to do some of the calcs in python, however I am finding it a problem with the lack of dimensionality. I frequency have a list of n particles and a multi-dim array for each particle and want to be able to access directly any component with ease. How best to go about this...

my prop = [n][x][y][z]

I might need a particular value and then to update that. I do not want to have to deal with lists etc etc as this feels rather cumbersome, adding, removing etc. There must be an easy way.

View 2 Replies View Related

Programming :: PHP - Sort Multi Dimensional Array

Apr 30, 2010

I have a multi-dimensional array like so:

Code:
Array (
[0] => Array (
[0] => Eleven
[1] => NumberEleven
[2] => 11 )
[1] => Array (
[0] => Twelve
[1] => NumberTwelve
[2] => 12 )
[2] => Array (
[0] => AnotherEleven
[1] => Eleven,Again
[2] => 11 )

I need to sort it by array[ $key ][ 2 ] so that it is sorted like so:
Code:
Array (
[0] => Array (
[0] => Eleven
[1] => NumberEleven
[2] => 11 )
[1] => Array (
[0] => AnotherEleven
[1] => Eleven,Again
[2] => 11 )
[2] => Array (
[0] => Twelve
[1] => NumberTwelve
[2] => 12 )

I've looked at the php array docs the closet thing I found was array_multisort which won't work for my above requirements, does anyone have any insight to how to sort this way?

View 3 Replies View Related

Programming :: (PHP / XML) Sorting Through Multi Dimensional Array

Sep 17, 2010

I am parsing through XML documents with a PHP script and creating an array because, as far as I know, I can manipulate arrays better than the features DOM gives me. That part is not as important, though. The array it produces though is multi-dimensional, but somewhat inconsistent. If I have the following XML:

PHP Code:
<domains> <domain>
<title>google.com</title> <bookmarks>
<bookmark>maps.google.com</bookmark>
<bookmark>news.google.com</bookmark>
<bookmark>mail.google.com</bookmark>
</bookmarks> </domain> <domain>
<title>bankaccount.com</title>
<bookmarks> <bookmark>login.bankaccount.com</bookmark>
</bookmarks> </domain> </domains>

To call the first bookmark from the first domain, it would be:
PHP Code:
$array['domains']['domain'][0]['bookmarks']['bookmark'][0]
To call the first bookmark from the second domain, it would be:
PHP Code:
$array['domains']['domain'][1]['bookmarks']['bookmark']

The problem is, I want to simply call bookmarks through a simply 'foreach()' or 'for()' function and the lack of consistency might be a problem, but the fact that some levels have a '0' array key and others do not is causing a problem.

View 1 Replies View Related

Programming :: Profile Performance Software?

Aug 2, 2010

I am writing simple code to learn .However, I have trouble understanding the callgraph and explain which one take more CPU or running longer in the loop. I just wonder if anyone can help explaining to me.

Code:
int mysqr(int i)
{

[code]....

View 1 Replies View Related

Hardware :: ATI Multi Card Multi Display Xinerama Composite

Jun 24, 2011

I have an ATI Radeon HD 3300 on-board video chipset, and an ATI Radeon HD 4350 PCI card. What I want is to have both displays available from one mouse/keyboard. I want to play media on one and have the other as my main desktop.The problem is that with Xinerama enabled, KDE desktop effects do not work (KDE says XComposite and XDamage are not available, even though I explicitly enabled them as extensions in the xorg.conf file), and performance is quite bad. Without Xinerama enabled, performance is great, desktop effects work great, but there's a lot of trouble with full-screen video, and the KWin window manager does not apply in the second display (although I can run a second instance of KWin on :0.1).

View 2 Replies View Related

Programming :: PHP - Sorting Multi Dimensional Arrays By One Column

Mar 17, 2009

I just started programming in PHP so I haven't figured out how to do this yet, but I have a multi-dimensional array that I need to sort by one column. That's fine...but I need the sort to ignore case! Right now I have it sorted by 'name' (the other column is 'uid').

The problem is that by the default the sort is case-sensitive so the array looks like this:
Code:
Apple 4015
Banana 4011
Cherry 4045
avocado 4046

I want to be able to sort the the 'name' column in a case-insensitive manner so that the array actually looks like:
Code:
Apple 4015
avocado 4046
Banana 4011
Cherry 4045

How to accomplish this? Just FYI I'm not actually sorting the PLUs for fruits...but it was a simple example. I'm actually doing this for a Facebook application.

View 2 Replies View Related

Programming :: Access To Multi-Partitions Disk Image

Jan 30, 2010

I have a 2GB file which is a dd image of a block device. The block device (a USB-connected flash memory) contains multiple partitions, and therein lies the problem. I want/need to access the various partitions in the image file, but need to do this without actually using a physical flash memory device. If the image was that of a single partition, I could simply mount it on a loop device, and access the filesystem as necessary. However, I can find no kind of virtual block device upon which to write/mount the image.

I've searched the net exhaustively for anything that would seem to allow me to do what I need, but without even a sniff of success. Sadly, I have seen bits of information that suggest "you can't get there from here". Even the outstanding dd tutorial by AwesomeMachine on LQ didn't help. Anyone know of a kind of virtual block device on which a multi-partition image can be written and mounted? Or any other way I can access individual partitions (with various filesystem types on each) and then re-assemble them back to a single image?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved