Date: Thu, 2 Jan 2014 23:13:32 -0700 From: Warner Losh <imp@bsdimp.com> To: chump1@hushmail.com Cc: freebsd-arm@freebsd.org Subject: Re: Beagle recommendations Message-ID: <E2EB3456-B59E-4434-9444-7A0EF2DA22B6@bsdimp.com> In-Reply-To: <20140103052201.E9397200F5@smtp.hushmail.com> References: <20140103052201.E9397200F5@smtp.hushmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Do you have options SMP in your kernel? Warner On Jan 2, 2014, at 10:22 PM, chump1@hushmail.com wrote: >=20 > I have a fairly simple task that involves processing something in a 2D = array, MxN times. I took a naive approach, 1x process 1x thread, and it = took a little longer than desired. Well now, I could do better with some = multi processing, especially on a multi core box, right? >=20 >=20 >=20 >=20 > Well, I have not had much luck. At first I spawned M threads and had = each iterate over each N in turn, with M between 25-35. It took much, = much longer than the single thread. I figured contention and overhead = were costing me big, and gave it a shot with a scaled down version of = the problem, M=3D10. Still, much slower than the single thread. A little = confused, I went back to the big problem set (25-35), and made a new = program that spawned only two threads, and each is limited to processing = only even or only odd data sets. Even that still takes twice as long as = the single thread version! What is up with that? >=20 >=20 >=20 >=20 > More important asides, I am barely doing any real processing at all. = It is basically a no-op, barely doing more than incrementing the = counter. Should I expect to see performance gains once I am doing real = work in the processing portion of my program? Should I expect to see = much different behavior on a different OS? Also I have one physical = processor, two cores. Would I see better gains with more cores? How do = you find processes and threads scale against hardware overall? >=20 >=20 >=20 >=20 > Thanks! >=20 >=20 > Sent using Hushmail >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E2EB3456-B59E-4434-9444-7A0EF2DA22B6>