You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 黄吉浩 <13...@163.com> on 2013/10/29 08:18:36 UTC

data share in distributed test

In 'CSV Data Set Config' element, I set Filename to sth like:
\\1.2.3.4\xxpath\yyfile
It's purpose is that I don't need to distribute yyfile to every machine that participant the test.
 
but, can jmeter support the senario: i.e.
yyfile contains
UserA
UserB
 
I have 2 jmeter machines, master and slave
so jmeter let master to choose UserA, and slave to choose UserB?
 

Re: data share in distributed test

Posted by sebb <se...@gmail.com>.
On 30 October 2013 06:01, 黄吉浩 <13...@163.com> wrote:
>> Reading the same file from many remote machines will negatively impact your test performance and may affect network, mainly your JMeter master machine.
> not always true. It depends on the csv file size, I think.
> what's more, jmeter need to physically read the csv file once at the begining of test, and during the test get from the memory. right?

Yes and no.

If you use the CSVRead function, that does read the entire file into memory.

However CSV Dataset Config reads the file as needed.
Ditto the StringFromFile function

>>If you have to read distinct data from each one of the JMeter slaves used,
>>you must have to split the original CSV dataset file in as many files as
>>the number of JMeter slaves.
> Yes, I have to.
> you're right, I must have to do as what you said, but the way is not convinient.
>
> At 2013-10-29 21:24:20,"Flavio Cysne" <fl...@gmail.com> wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: data share in distributed test

Posted by Flavio Cysne <fl...@gmail.com>.
If you intend to read the files from the same remote directory you can
split the original file as said before, naming the file parts with the
machine name and use __machineName function to get a distinct file per
JMeter slave.
If you have more than one JMeter slave in the same machine you may need to
define a property and a unique value to each JMeter slave, this way each
JMeter slave can read a distinct file.


2013/10/30 黄吉浩 <13...@163.com>

> > Reading the same file from many remote machines will negatively impact
> your test performance and may affect network, mainly your JMeter master
> machine.
> not always true. It depends on the csv file size, I think.
> what's more, jmeter need to physically read the csv file once at the
> begining of test, and during the test get from the memory. right?
>
> >If you have to read distinct data from each one of the JMeter slaves used,
> >you must have to split the original CSV dataset file in as many files as
> >the number of JMeter slaves.
> Yes, I have to.
> you're right, I must have to do as what you said, but the way is not
> convinient.
>
> At 2013-10-29 21:24:20,"Flavio Cysne" <fl...@gmail.com> wrote:
>

Re: data share in distributed test

Posted by 黄吉浩 <13...@163.com>.
> Reading the same file from many remote machines will negatively impact your test performance and may affect network, mainly your JMeter master machine.
not always true. It depends on the csv file size, I think.
what's more, jmeter need to physically read the csv file once at the begining of test, and during the test get from the memory. right?

>If you have to read distinct data from each one of the JMeter slaves used,
>you must have to split the original CSV dataset file in as many files as
>the number of JMeter slaves.
Yes, I have to.
you're right, I must have to do as what you said, but the way is not convinient.

At 2013-10-29 21:24:20,"Flavio Cysne" <fl...@gmail.com> wrote:

Re: data share in distributed test

Posted by Flavio Cysne <fl...@gmail.com>.
Sorry, ZK. I replied to your message, but I was intending to reply the
previous thread message.
Reading a local file should not have negative impact on performance.

I forgot to mention a thing: CSV Dataset Config will read the same lines
for all JMeter slaves used in distributed testing.

In distributed testing, for example with 5 threads in Thread Group, thread
numbers 1, 2, 3, 4 and 5 will be created by all JMeter slaves; CSV Dataset
Config for thread 1 will read the first line, thread 2 the second and so on.
If you have to read distinct data from each one of the JMeter slaves used,
you must have to split the original CSV dataset file in as many files as
the number of JMeter slaves.


2013/10/29 ZK <st...@gmail.com>

> I assumed (incorrectly) that the CSV would be local to to the jmeter
> instance
> on each test injector
>
> ie.: ./CSV/csvFile
>
> Would this have a negative impact on performance?
>
>
>
> ZK
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/data-share-in-distributed-test-tp5718569p5718577.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: data share in distributed test

Posted by ZK <st...@gmail.com>.
I assumed (incorrectly) that the CSV would be local to to the jmeter instance
on each test injector

ie.: ./CSV/csvFile

Would this have a negative impact on performance?



ZK



--
View this message in context: http://jmeter.512774.n5.nabble.com/data-share-in-distributed-test-tp5718569p5718577.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: data share in distributed test

Posted by Flavio Cysne <fl...@gmail.com>.
I have to warn you about what you're doing.
Reading the same file from many remote machines will negatively impact your
test performance and may affect network, mainly your JMeter master machine.

One possible solution, similarly to a JUnit Test class, is to add another
Thread Group that will run only 1 thread and only once.
This Thread Group (Setup Thread Group) will run an OS Process Sampler
executing a copy of the CSV file from the remote machine to the JMeter
slave machine.
This approach has a con: you can't use CSV Dataset Config because the file
might not exists in JMeter slave machine and if it exists will be outdated
when loaded.
To overcome this you could use
__CSVRead<http://jmeter.apache.org/usermanual/functions.html#__CSVRead>function.

My opinion is that this kind of "configuration" should be done before the
test is executed, not during the test.
May be one step more, but you can easily automate this step with a shell
script.


2013/10/29 ZK <st...@gmail.com>

> Hi,
> would it not be easier to have 2 different yyfile files?
>
> the 1 on the master only having UserA data
> the 1 on the slave only having UserB data
>
>
> ZK
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/data-share-in-distributed-test-tp5718569p5718572.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: data share in distributed test

Posted by ZK <st...@gmail.com>.
Hi,
would it not be easier to have 2 different yyfile files?

the 1 on the master only having UserA data
the 1 on the slave only having UserB data


ZK



--
View this message in context: http://jmeter.512774.n5.nabble.com/data-share-in-distributed-test-tp5718569p5718572.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org