Date: Sun, 19 Feb 2012 12:47:32 -0600 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: "Kevin H. Patterson" <kpatterson.home@gmail.com> Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD 9.0-RELEASE on PowerMac Dual G5 Message-ID: <4F4143C4.8030403@freebsd.org> In-Reply-To: <3934AD65-E01C-4DDD-8BDC-F52C6AE3655F@khptech.com> References: <3934AD65-E01C-4DDD-8BDC-F52C6AE3655F@khptech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/18/12 18:56, Kevin H. Patterson wrote: > Hello, > > I've taken an interest lately in running FreeBSD on the powerpc64 > architecture. I have access to a dual 2.5 GHz PowerMac G5, and I've > successfully got FreeBSD 9.0-RELEASE up and running on it. > > Only one thing seems amiss so far... it feels *very* SLOW. I realize > this is an older machine, but it feels much too slow for a dual G5. > Compiling seems to take forever, and top shows ~50% or more "system" > CPU usage when doing almost anything other than sitting idle. > Furthermore, the system fans never speed up, but run at the lowest > speed even when the system is under full load. I have tried both > enabling and disabling powerd support, with no effect. > > For a quick sanity check, I installed ubench (0.32) from ports. The > numbers were quite disappointing: 109870 CPU / 50527 MEM > multiprocessor, and 55433 CPU / 30863 MEM single-processor. > > For comparison, I ran ubench (0.32 from MacPorts) under Mac OS X > 10.5.8 on the same machine. This time, the fans do ramp up, and the > numbers are *WAY* better: 277207 CPU / 317119 MEM multi-processor, > and 141021 CPU / 284113 MEM single-processor. The very nearly a factor of two is suspicious. Can you check in dmesg if your reported CPU speed is what you think it should be? Some G5s boot with their CPUs at half-frequency. On most 970MP and 970FX systems, you can change the CPU with a sysctl (cpufreq(4)), but on others we don't have a driver yet. The fan speed may not mean anything -- the fans are software managed and FreeBSD uses a different algorithm than OS X. > As you can see, all is not well. I am wondering what is slowing > FreeBSD down on this machine. I have tried both GENERIC and my own > kernel config. It feels like the CPU and or bus speed is clocked down > perhaps to the most energy-saving level. Maybe this is where > openfirmware leaves it after boot? Also interesting is to note the > drastic *single-processor* ubench difference between macosx and > freebsd. To me this looks like a low clock-speed smoking gun. > > I also noticed that the kernel build includes flags like -msoft-float > and -mno-altivec... These flags just affect internal kernel state-keeping and don't affect anything (since the kernel doesn't use any floating point, for instance). OS X and Linux are built the same way, and FreeBSD on x86 is built with equivalent flags. > I am interested in any build or config tweaks that might be in order. > I am also more than happy to debug and get to the bottom of this. Any > ideas? If the CPU speed is in fact right, it's possible you've just run into limitations of our kernel. PowerPC64 is a new platform, and the emphasis was more to get it working than to optimize things (this is also mostly true of 32-bit PPC). It's possible there are some large bottlenecks in the VM system. Straight numerical code (something like sha256 -t) is not affected by such problems, but things that involve spawning and reaping large numbers of processes might be. Andreas Tobler (andreast@freebsd.org) was doing some work recently on kernel profiling, and I'm sure would appreciate some help identifying hotspots. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F4143C4.8030403>