On 08/17/2012 06:10 PM, Roy Stogner wrote:
>
>
> On Fri, 17 Aug 2012, Jens Lohne Eftang wrote:
>
>> On 08/17/2012 05:39 PM, Roy Stogner wrote:
>>>
>>> On Fri, 17 Aug 2012, Jens Lohne Eftang wrote:
>>>
>>>> On 08/17/2012 04:47 PM, Roy Stogner wrote:
>>>>>
>>>>> On Fri, 17 Aug 2012, Jens Lohne Eftang wrote:
>>>>>
>>>>>> In the svn head, the exact line numbers are 752-768, and 780-799. 
>>>>>> I am running in opt mode, and it's on a workstation (no cluster).
>>>>>
>>>>> Ah, this might be more interesting then: could you log the
>>>>> idx_map.resize(...) and local_values.resize(...) separately? Maybe
>>>>> the problem is simply memory allocation...
>>>
>>>> the idx_map.resize() alone is 81 seconds.
>>>
>>> That's not counting the std::fill afterwards?
>>>
>>> Interesting.
>>>
>>> Try making the idx_map declaration static and see if it improves
>>> things at all?  I don't think we want to do that long-term, but if
>>> there's any improvement we could look for other ways to fix up the
>>> cost here.
>> static std::vector<unsigned int> 
>> idx_map(3*io_blksize,libMesh::invalid_uint)
>>
>> upfront reduces the time by 80 seconds right away ...
>
> It's definitely the underlying malloc giving us trouble, then.
>
> I'm Cc'ing Ben on this too, since IIRC this was his code, and I'm
> afraid of making any optimizations for this case which turn out to be
> pessimizations for other cases.
>
> Let's try something that might be easier to make into a version
> suitable for everyone: what happens when you reduce the value of
> io_blksize at the top of the file?  Try knocking one and two zeros off
> that and see what happens to the resize() time and to the
> read_serialized_etc time as a whole.
>
> If that works, then we could try using a block size that gets reduced
> for sufficiently small n_objects rather than using a fixed block size
> for any read.
That helps a lot. Now I also do the static allocation, but in addition 
reducing io_blksize to 2560 knocked another 180 seconds off the 
computation time.

The time for reading in the 1GB of data is now 20 seconds (all calls to 
read_serialized_vector), which I still find a bit too much, but 
obviously way better than before. Thanks!


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to