David_Schreck

updated

15 years ago

0

1139

September 16th, 2011 04:00

XAM and mutliple writes

Hi,

I'm trying to figure out what is the best way to perfomr multiple wirte to a Centera using XAM.

Lets say I've 10 thread that must write a file to a Centera.

What is the approach that will be the more efficient:

The 10 thread sharing a one and only connection ?

XSystem xsys = xamLib.connect(xri);

for (int i = 0; i < 10; i++)

{

     Creator creator = new Creator(xsys);

     creator.start();

}

Or each thread using a sperate connection:

connections = new ArrayList (10);

for (int i = 0; i < 10; i++)

{

                XSystem xsys = xamLib.connect(xri);

                connections.add(i, xsys);

}

for (int i = 0; i < 10; i++)

{

                Creator creator = new Creator(connections.get(i));

                threads.add(creator);

                creator.start();         

}

If I test the total time to perform, both are similar.

Does that means the operation are serialized at some point ?

I was think using different connections would have been quicker.

What am I getting wrong ?

Thanks in advance.

David