Posted by bob cox on November 07, 2002 at 10:00:36:
I have a simple question for you: do programs like 3dANOVA3 and 3dMerge
always take longer when operating on subbricks of multi-brick files? In
other words, is it worth my while to always split up the bricks of a file
if I'm going to be running one of these programs on them?
It seems to me that there should be no difference, but I am finding that
doing these computations on the bucket files (using brick selectors) to be
excruciatingly slow compared to doing them on the same files split apart.
The main difference between subscripted datasets ('fred+orig[7]') and un-subscripted datasets (fred+orig) is in the way their 3D arrays are read into the program. For un-subscripted datasets, the .BRIK files are mapped directly into memory (using the mmap() system function). For subscripted datasets, the needed pieces of the .BRIK file are read into memory that is allocated with the malloc() function.
This normally shouldn't cause such a performance difference, unless you are using so much memory that your system is starting to use "swap space" - this is virtual memory on disk that will be used if malloc() uses up all the RAM. mmap()-ed datasets won't require swap space, and things will probably work better in such a scenario. But this depends heavily on the type of Unix system you are using. What system are you using, and how much memory does it have?
One way to check if you are using up all the RAM is to use the system program "top" while running the piggy program. Every second it will display the CPU etc. usage of the top programs on the system. At least on my system, it has a column labeled "%MEM", which shows how much memory that each program is hogging. At the top of the screen is a display of how much memory total is being used on the system.
So, in short, the answer to your question is maybe.
bob cox