Date: Sat, 16 Dec 2006 12:37:50 -0600 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: freebsd-hackers@freebsd.org Subject: Re: "Syncing cpus" on a multi-cpu, dual core system Message-ID: <45843CFE.7020006@math.missouri.edu> In-Reply-To: <20061216.113017.-345495563.imp@bsdimp.com> References: <200612141437.28724.mldodson@houston.rr.com> <20061216.113017.-345495563.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
M. Warner Losh wrote: > In message: <200612141437.28724.mldodson@houston.rr.com> > "M. L. Dodson" <mldodson@houston.rr.com> writes: > : On a computational chemistry list I subscribe to there is a > : current thread about multi-cpu systems needing to have the cpu > : frequencies synced (this is in a Linux context). This is > : evidently not just having the cpus running at nominally the same > : frequency but something else in addition. A posting in the thread > : said variations less than 0.1% were not problematic. However, the > : poster said it was an issue in a dual cpu, dual core system he had > : set up. > : > : My questions are: > : 1. Is this real or an urban legend? > : 2. If real, is this a Linuxism or is FreeBSD affected as well? > : 3. How do you "sync" the cpus, if it is needed? > : 4. anything else some one wants to expound on along this line. > > Linux keeps the cpu's frequencies 'synchronized' so that it can use > the fast time keeping hardware (TSC). FreeBSD uses different > mechanisms for its timekeeping, so doesn't need to keep them in sync > at all, and doesn't even try at this point. Maybe this is what they > are talking about... > > Warner One thing I have noticed with FreeBSD is that if I am running a program that multithreads and creates and destroys threads a lot (e.g. the fftw3 port), then top underreports significantly - that is on a 4 processor system it might report 60% (or even 0%) cpu usage, when it is clear from the TIME field that it is closer to 250% cpu usage. The other thing I have noticed is that when I split jobs using threads so that I can use several processors, the speed up to the program is far less than one might expect - indeed sometimes it even gets slower. Stephen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45843CFE.7020006>