Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network speed

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I am accessing an 18Meg Db over a network. Speed is fine on my office machines but client is complaing that it takes 20 seconds to access on his.

Any suggestions why there should be such a difference in performance. Both netwoks are based on the same model of router.

Keith
 
Do a basic test of sending a large text file from computer to computer. What are the speed differences there? Are we talking about 2 different server? If so could the issue be in the servers, e.g. speed of disk access? (Maybe something as simple as disk fragmentation?) What else could be running on the network and/or server(s) at the same time? In otherwords there are lots of variables to this issue and it takes some investigation to track it down.

Lion Crest Software Services
Anthony L. Testi
President
 
Hi Keith,

In the cases like you have described, 4 things need to be checked and/or replaced/upgraded:

LAN Hardware (NICs, switches, routers),

LAN Hardware (wiring - physical wires, cables),

LAN Hardware (server's RAM, RAID disks speed, etc. + WinOS version)
and ... ready?...

(drumbeat...)


... antivirus software configuration!

If the LAN H/W is identical in both cases, then the difference may be in the presence and/or configuration/tuning/mode in which your A/V program is dealing with the packets transmitting over the net.

I remember the case when our client's Sys Admin had to use what he called "siffer program" in similar situation (slow network).

What he finally found was that his Norton A/V was checking every single packet, and these packets were only 16 KB in size... The rest is everybody's guess... ;-)

HTH.



Regards,

Ilya
 
Ilya ,
you are so right about A/V being a source of issues.

Years ago (Windows 3.2, 386-CPU days that is ) we had a slow server issue but every time I went and checked the server things were fine. Then ~15 mins later the system would slow slow slow down. Finaly discovered that it was the screen saver on the server kicking in. My point is lots of things can be the reason for slow networks/servers.


Lion Crest Software Services
Anthony L. Testi
President
 
Hi

I was wondering where the executable and the runtime support were installed - if they are on the server, that would slow things down quite a bit.

Martin

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Network is only 2 machines in both locations.
A/V is a possibility, I have Norton on my office machines and the client has some other brand.
The .exe and the runtime libraries are on the server in both installations.

Worth mentioning that the client's setup used to run quickly but has slowed down over the last 3 months. His local tech says the network is operating normally, whatever that means. I have sent him slim versions of his main tables with which to test the network speed. I will know more tomorrow when he gets back to me.

Keith
 
client's setup used to run quickly but has slowed down over the last 3 months" One hunch would be to look at the server harddrive, how much is free and what is the defragmentation on it?

If only 2 machines (Server and client) why have the application on the server at all? Seems best to keep it only on the one client computer. If it is actualy 3 computers (Server and 2 client) do both client computer see the same slowness issues?

Lion Crest Software Services
Anthony L. Testi
President
 
Keith,

as suggested above try moving the .exe plus all dll and flls to the local pc and excluding all dbf/fpt/cdx/dbc/dct/dcx files from realtime AV scanning.

also

make sure the program's temp folder is on the local PC.

and try putting

coverage=cover.log

in the config.fpw file. This may show only a handful of instructions are causing the delay and need optimizing.

What size is the .exe? Performance issues with an .exe > 13mb can be resolved using PROGCACHE.

hth

nigel
 
Hi Nigel,

I would be very cagy with turning on the coverage at the customer's site - it's a lot of disk I/O operations! I hope no further elaboration is needed...

Besides, it is also a matter of relationship between the provider and the client's administration, end users and IT staffers: you would need their complete trust and cooperation, and they might not like it to be a "guinney pigs for your experiments".

I, usually, had extremely friendly relations with my clients, but not so friendly with small number of some of them (mostly - Sys Admins were the ones who gave me grieves).

So, I would take it into consideration also.

HTH.


Regards,

Ilya
 
Keith,

your statement "client's setup used to run quickly but has slowed down over the last 3 months" get me thinking: what might have been changed at the customer's site? Worth asking your client about it, IMHO.

HTH.


Regards,

Ilya
 
Ilya,

i've never found set coverage too onerous to use at a customer's site - especially as a one off diagnostic... and just opening that file in notepad can be very illuminating.

I take your general point about customer's buy in... but isn't that true of anything we're likely to suggest here? I would have counted set coverage amongst the least intrusive things to try.

n
 
oh... make sure the coverage output is on the local drive. So make it something like...

coverage = c:\temp\cover.log

n
 
I did it once at work, Nigel, and it was not that big a program (SCATTER-INSERT of couple hundred K recs), and I did, indeed, found what was the "cork in a bottleneck", but - boy!!! - how slow did it crawl! This slow program usually ran for 12-15 minutes; with COVERAGE ON - close to an hour, thankyouverymuch! And, should it be at the customer's site - what this poor Sys Admin is supposed to do all this time? Just sit on his hands and watch the changes on the WAIT WINDOW?

Another example: re-indexing a file of half million records, 1.2 GB, with CDX size to match; did that on-site, with customer's Sys Admin, after hours (flight landed at around 18:00, I arrived at the customer's place 2 hours later); started the process, took that guy to a reastaurant for dinner; came back 2 hours later - and waited another 20+ mim. for the process to finish... Imagine what would it be if COVERAGE was ON...
'Nuf said? :)


Regards,

Ilya
 
Ilya
A couple of suggestions. Inserting records can be slow because of the physical movement of the records, suggest using Append instead. If needed at the end of the data adding do a SORT, you should find that process much faster. Also in some situations when added lots of data at the same time it is a good idea to remove indexs and then adding them back in.

Re-indexing a 500,000 records in 2+ hours? Suggest removing all of the indexs then adding one at a time back. I would not be suprised if the actual indexing took < 1 min. Might take 1/4 to 1/2 hour to write the code to do it thou. (of course this might have been years ago with slower computers etc. so the indexing might be a bit longer then a minute. Also it depends on the number of indexs and if compound and/or complex indexs are used.)

BTW my rule-of-thumb is that a CDX file should not be more then 10% of the table size, normally more like 1%, otherwise I start to wonder if there are too many indexes, e.g. someone adds a 'special' index that they think is helpful for a report that is run once a month. Problem is that index slows everthing else down. e.g. the computer has to spend time keeping the index up, the network slows downs transfering the information, and there is less room in the RAM for more important information just to name a few reasons for nor having 'bloated' CDXs

Lion Crest Software Services
Anthony L. Testi
President
 
Thanks, Antony, for the suggestion, but that first episode happened in Jan. 2001, and second - in Mar. 2002! And all these little tricks you're talking about were found and implemented eventually back then back there, by my then company IT staffers. And that large CDX? Couldn't do anything about it: we were doing data archiving, and each field in the page and line pointer files was ordered and paid for by customers. And if it happened to be an archive of an ATM transactions log of one of the major banks, where every column was a search field - here you have it.
But - thank you anyway, colleague, for trying to help.
You are a gentleman and a scholar, and your generousity is exceeded only by your good looks. :)


Regards,

Ilya
 
Ilya

In your first example i suspect something else was going on and that set coverage was not the culprit.

I just ran a daily routine for one of my apps across my network. Not a large dataset but that's of little importance here. The coverage log is 8.8mb with 101289 lines of code.

I ran it thrice with coverage on and thrice with coverage off.

The timings with set coverage on (in secs)

36.8
34.3
33.6

with set coverage off

38.3
32.3
40.2

n
 
Plenty of intersting discussion there but I think it is way beyond the cause of my problem.
I sent my client a new version of the .exe with wait windows in the section of code where the hold up was, as a means of finding the bottle neck.

The hold up is on a SELECT statement which finds the MAX value in an invoice column, so I can calculate the next invoice number.
I have replaced the select statement with
Code:
SELECT FRAMES
SET ORDER TO REC DESC
GO TOP
NEWREC=FRAMES.REC
and all is now running smoothly.
Is there a more efficient way of finding the highest invoice number or is this as good as it gets?

Keith
 
You could also store a counter seperate, but AUTOINC integer fields are there for doing this, you don't need any code for that any longer since VFP8.

Bye, Olaf.
 
Thanks Olaf but this is VFP6.
Autoinc would not work in this instance anyway.
The table in question is a record of created work and an invoice number is only issued when the item is sold. The invoce numbers need to be created in sales order rather than manufacture order.
It seemed to be the simplest method, when issuing a new invoice to get the highest invoice number, assign it to a counter and increment the counter to create the new invoice number.


Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top