Dear Ged, Robert,
that makes sense. After normalization I do reslice at 4x4x4 mm, not at
2x2x2, so my images that go into the GLM estimation are of modest size.
But, indeed, there are many (1000) because we scan very fast (0.5
sec/brain volume). That might explain the drastic improvements I found
when increasing maxmem from 2^20 to 2^30. But with 1000 (scans) x 64 x
64 (matrix) x 2 (16 bit integer) /1024 = 8000 kB we shouldn't go any
further than maxmem=2^23 (=8192 kB), I do not think things will get much
larger. Unless someone somehow whishes to upsample to 2x2x2 when
normalizing.
But still it is hard to grasp why GLM estimation with both spm2 and spm5
having maxmem at 2^20 yields an 8x speed difference in estimating the
model. I guess some other things are implemented differently in spm5
with respect to memory mapping/estimation?
But who cares, it is fast now ;-)
Cheers,
Bas
Ged Ridgway wrote:
> Robert Welsh wrote:
>
>> You should change maxmem
>>
>> FYI : 2^20 = 1megabyte.
>> you are most likely thrashing yourself to death.
>>
>> if you have a 2 gig of ram i would suggest making
>> maxmem = 2^28 or 2^29
>
>
> When I first read this I thought it would make an enormous amount of
> difference, since 1 Mybte is tiny. However, note that the estimation
> is still done plane-by-plane -- see e.g. lines 504-5 and 617-8 of
> spm_spm.
>
> For data with 109*109 plane-size (e.g. the standard SPM5 template) a
> complete plane is only about 100 kbyte of memory, so with e.g. 1000
> scans, there are only about 91 blocks per plane with the default
> maxmem size, and any maxmem above 2^27 (128 Mbyte) will be no better
> than 2^27. Of course, setting it to 2^29 should do no harm if have
> more memory than that, and if you do have *loads* of images then it
> will help.
>
> So while this will make a difference, I'm not sure it will entirely
> explain Bas's concerns -- though, Bas, back to you to say if it has...
>
> Best,
> Ged.
--
--------------------------------------------------
Dr. S.F.W. Neggers
Division of Brain Research
Rudolf Magnus Institute for Neuroscience Utrecht University Medical Center
Visiting : Heidelberglaan 100, 3584 CX Utrecht
Room A.00.1.24
Mail : Huispost A.01.126, P.O. Box
3508 GA Utrecht, the Netherlands
Tel : +31 (0)30 2503386
Fax : +31 (0)30 2505443
E-mail : [log in to unmask]
Web : http://www.fmri.nl/people/bas.html
--------------------------------------------------
|