Date: Mon, 15 Sep 2008 19:36:04 -0500 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: Martin Cracauer <cracauer@cons.org> Cc: freebsd-current@freebsd.org Subject: Re: Improved multiprocessor usage on amd64 Message-ID: <48CEFF74.8020602@math.missouri.edu> In-Reply-To: <20080915195021.GA69528@cons.org> References: <48CDBC78.4010409@math.missouri.edu> <20080915195021.GA69528@cons.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Martin Cracauer wrote: > Stephen Montgomery-Smith wrote on Sun, Sep 14, 2008 at 08:38:00PM -0500: >> I have a dual core amd64 on which I run a processor intensive numerical >> program. I had been frustrated because it seemed to run 3 or 4 times >> faster under Linux. But with a recent upgrade of FreeBSD-CURRENT, it >> now goes at about the same speed as Linux. > > Are the threads meant to provide additional CPU resources or help with > concurrency/IO issues? They are meant to provide additional CPU resources. > > Do you create a lot of new threads on the fly? > No. They are synchronized via standard pthread_cond type constructions... > What kind of worker model do you have there? > ... and each thread is a loop of the form while (1) { wait until told to start; do massive amounts of floating point arithmetic (only additions and multiplications) on large arrays; tell the master process that you are done; } > Do you have about as many threads as processor or more? Both ways. The time difference between the two approaches is negligible. > > How malloc intensive is it? All mallocs are done one time at the beginning. > > Martin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48CEFF74.8020602>