My workplace is connected via cable internet with limited up/downstream, so for load-testing a web application I am using a distributed approach:
An instance of jmeter-server (v2.4) is running on a remote linux box which has proper internet connectivity.
The controlling jmeter GUI (also 2.4) is running on my desktop.
The two are connected via a VPN.
The SUT is a web-application hosted in another datacenter.
This works fine - I am able to start the remote thread execution from the jmeter GUI and receive live results in the Summary Report.
The weird part is that my ability to put real load on the SUT is limited by my local internet connection (inbound, downstream). Tracing the link between the local jmeter GUI and the remote jmeter-server, I can see that all HTTP-traffic from SUT towards jmeter-server is sent to the local jmeter GUI. So if the jmeter-server is retrieving a 1MB file from the SUT, it's then sending it to my local jmeter GUI (over my slow internet link).
Is that how it should be? I was expecting that only the key measurements would be transported (success, latency, etc).
[PS: I know I can scp my testplan across to the remote box and run it in a headless jmeter. But then I don't see live results...]
This is probably because you are having a "View Tree Results" in your jmeter script. This tells the server to send all responses back to the master so you can view them. That will quickly fill your bandwith and is memory intensive. Try to disable all listeners in your script and only have the "View Aggregate results" one in there.
With high load, you're not interested in individual results. There is also no need to open up your firewall in your datacenter if you use ssl tunneling. I've documented that in a blogpost because I couldn't find a simple step-by-step online, you might want to check that out too at http://rolfje.com/2012/02/16/distributed-jmeter-through-vpn-and-ssl/
I would recommend you to write your results to a file. Before doing so, you can optionally perform a select / deselect of result save configuration by clicking on configure button and/or by checking write success/error to log. By unselecting result sampler data, save response messages etc you can reduce the amount of data being sent to your console.
I THINK the way you have it set up, both the Local instance of Jmeter and the remote are running the script at the same time, hence traffic is being directed to your local box.
What I've found to be more effective is to remote INTO the machine running JMeter. Everything is then local to the proper machine, and I don't have to worry about bottle necks.
I would recommend having a simple data writer element that saves to a file on the REMOTE linux box.
In the GUI, you could still have just the aggregate report to keep an eye on what's happening.
Hope this helps. If not, I would recommend posting to the JMeter user group:
http://jmeter.512774.n5.nabble.com/
Related
Background
From the docs, at https://github.com/GoogleCloudPlatform/gradle-appengine-plugin
I see that by putting my functionalTests in /src/functionalTests/java does the following:
Starts the Local GAE instance
runs tests in the functionalTests directory
Stops the Local instance after the tests are complete
My Issue
For my microservices, I need to have 2 local servers for running my tests. 1 server is responsible for a lot of auth operations, and the other microservices talk to this server for some verification operations.
I've tried
appengineFunctionalTest.dependsOn ':authservice:appengineRun'
this does start the dependent server, but then it hangs and the tests don't continue. I see that I can set deamon = true and start the server on a background thread, but I can only seem to do that in isolation.
Is there a way to have a 'dependsOn' also be able to pass parameters to the dependent task? I haven't found a way to make that happen.
Or perhaps there is another way to accomplish this.
Any help appreciated
Hi guys I've dumped (made a backup) of my Appengine datastore entities,following this tutorial, now I wonder if there is a way to restore the data locally ? so I can do some test and debug.
In windows, the datastore is in the directory
C:\Users\UserName\AppData\Local\Temp\AppName
In OSx this question can help you
In this directory are storade the datastore.db (the local storage), change the name (the app should not be running, and if is locked, kill all the python process)
Now go to the appengine dashboard
click in your app link
click in Blob Viewer (i'm assumming that you did the backup into a blobstore)
click in the file name
click in download
rename the file to datastore.db
copy to the previous path
start the app
Remote API (as koma mentions) is the main GAE-documented approach, and it's a good approach. Alternatively, you can download the entities using the cloud download tool, write your own store reader/deserializer, and execute it within your dev server local instance: http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data. Read the part about the New Approach...
While these options are not automatic and require engineering, I really wanted to point out the side effect of doing this: We have been facing performance issues in the local development server for months now, specifically when the datastore has more than 1,000 entities with over 50 indexes. Just search for "require_indexes slow" and you'll see what I'm talking about.
I'm sure you have a solid reason to import lots of data locally for testing and debugging, just wanted to let you know your application will perform extremely slow, and debug mode will be impossibly slow; we can't even use debug mode with our setup anymore.
If you want to get some test data in your local db, you could copy some using the remote api
I'm trying to go about setting up my BIRT reports and the iServer they sit on such that the database the Data Sources connect to are determined by the environment. Our setup is that currently there is just one iServer instance and many environments running a tomcat webapp that hit it (this may be the problem...).
Essentially the ideal is that the report connects differently in these places:
Local developement, which is running a local tomcat instance of the application which talks to the iPortal/iServer. Local database, but should be able to easily change to other databases for debugging etc.
QA deploy, qa database
Production deploy, production database
I've seen two options for how to fix this:
First option is to bind the Data Source to a configuration file in resources somewhere. Problem here is that if you have only one iServer, its resources are local to the server it is on, and not where the webapp. So, if I understand it correctly, this does not provide the flexibility I'm looking for.
Second option is to pass in all the connection info as report parameters and get the application to determine the correct parameters to send in. This way the application could pull from a local configuration file. This option would work, but I'm weary of the security (or lack thereof) in passing around connection info/credentials.
Does anyone have a better option? Or have people just run local iServer instances for developement? I can see running an iServer for each environment may simplify this issue and allow the reports released to production to be updated and tested in a QA environment without disrupting production, so maybe that is the solution.
One possible approach would be to set each of the connection properties conditionally in the Property Binding section of the Edit Data Source dialog, based on the value of a hidden parameter indicating which environment is to be accessed.
An example of this approach can be found here.
You mention that you are looking for an option for development, including the possibility of a local iServer. I think this would be overkill. Do you Dev & initial testing in BIRT; you do not need an iServer to run the report. If you need resources on the iServer to run & test the report you can reference those through the Server explorer in BIRT Pro. Once you are ready to deploy, I would follow Mark's strategy above using property bindings on the data source itself. That is as close to a best practice as exists for this migration requirement as exists in BIRT.
how can i record the web server log files and replay the the recorded server logs so that i can latter run the logs and check the load on sql server.
ex. number of request on and the number of resposes on sql server
Build a tool that can parse the log files from the web server and replay the requests again. Then you generate test cases by accessing your site using a normal web browser and record the log files.
You can then replay the same sequence over and over again and your tool could also read multiple logs and play them back simultaneously to simulate concurrency.
Make sure that the log files include all GET and POST request parameters as well as timestamps.
Here are a couple tools that you might find useful:
Selenium is a suite of tools specifically for testing web applications.
http://seleniumhq.org/
ab (Apache HTTP server benchmarking tool) is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an impression of how your current Apache installation performs. This especially shows you how many requests per second your Apache installation is capable of serving.
http://httpd.apache.org/docs/2.0/programs/ab.html
What's wrong with using a tool? Tools like selenium will exercise the front-end, you can probably setup a server and a collection of clients running on separate machines to simulate user interaction.
If you want to exercise the backend more directly you could write a unit test I suppose, but unit testing isn't really designed for doing that sort of thing.
My WPF application currently only shows a screen with some controls, it doesn't connect to DB or has any other functionality. It's a simple UI screen.
When I was testing in some computers (WinXP SP2), I've detected that it took more than 15 seconds to startup. They were all in our domain.
I've grabbed a similar computer, only with Windows installed, and the application took 2 seconds to startup.
Then I added the computer to our domain, and testing it with a domain user showed that it also took 15 seconds to startup. I tested again with the previous user (local user) and it's still fast. I created another local user, but it takes the 15 seconds that the domain user also takes.
I've added other local users but they were also slow.
To summarize: the application starts fast (2 sec) in only one user, the first one I tested. All other users (domain or local) are slow (15 sec).
I've been checking Improving WPF applications startup time but my problem seems to need a different approach. Does anyone figure out what can be happening?
I found another solution to this problem in this documentation from Microsoft.
Adding the following configuration to the app.config file will also solve the problem:
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
This way, you don't need to change computer configurations. It's just configuration of the application.
UPDATE:
Seems that .NET 4.0 fixed this issue, as documented here on MSDN.
Is the system connected to a network, but cannot reach the internet because the proxy is not configured? If so, go to Internet Settings (i.e. Internet Explorer Properties), Advanced, and look in the tree view for Security and a checkbox like "check revoked certificates" or something (I'm using German Windows, so I don't have the English label at hands). Uncheck and test again.
If this fixed the problem, you have one signed assembly that is not from Microsoft for which the .NET Framework will check for revocations, and time out after 15 seconds. If you disable the checking or configure the internet connection properly, you won't have to wait.
Does it open up a file or interact in the network in some way? Because if not, I would suggest that whether or not you're logged into a domain or running as a local user is probably a red herring.
Are you building in debug or release mode? It's worth trying release mode if you've not already because running in debug does a load of extra error checking..
Have you checked if there are any domain policies that can affect this scenario?
I had still this Problem (.NET 4.5). I my case the problem was, that the computer was not connected to the internet, but there were some other device (cameras etc.) which were connected via GigE. The startup of every .NET Application was delayed for about 20 seconds.
The solution was quite easy: Just connected the computer once to the internet, started any .NET application (first startup took about 7 seconds) and after that, every startup was quite fast, even if the computer was no longer connected to the internet. In addition I had to disable the protocol TCP/IP V6 (caused 3-5 seconds delay).
Another possible solution is to select Properties for the "internet Protocol Version 4 (TCP/IPv4), then select Advanced, select the tab "WINS" and set "Disable NetBIOS over TCP/IP".