views:

95

answers:

3

Hi,

I am creating a service which receives some data from mobile phones and saves it to the database.

The phone is sending the data every 250 ms. As I noticed that the delay for data storing is increasing I tried to run WireShark and write a log as well.

I noticed that the web requests from mobile phone are being made without the delay (checked with WireShark), but the in the service log I noticed the request is received every second and a half or almost two seconds.

Does anyone know where could be the problem or the way to test and determine the cause of such delay?

I am creating a service with WCF (webHttpBinding) and the database is MS SQL. By the way the log stores the time of http request and also the time of writing data to the database. As mentioned above the request is received every 1.5 - 2 seconds and after that it takes 50 ms to store data to the database.

Thanks!

A: 

My first guess after reading the question was that maybe you are submitting data so fast, the database server is hitting a write-contention lock (e.g. AutoNumber fields?)

If your database platform is SQL Server, take a look at http://www.sql-server-performance.com/articles/per/lock_contention_nolock_rowlock_p1.aspx

Anyway please post more information about the overall architecture of the system... what softwares/platforms are used at what parts etc...

chakrit
A: 

Maybe there is some limitation in the connection imposed by the service provider?

What happens if you (for testing) don't write to the database and just log the page hits in the server log with timestamp?

A: 

Check that you do not have any tracing running on the web services, this can really kill perf.

Steve Haigh