very slow connection to NAS drive #2

Hi,

I have a user that complains of very slow open time when perform a 
"File->Open" operation in my application over a NAS Drive. For the most 
part, the File -> Open is accessing/reading a sqlite database file. Once 
the file is "opened" other operations (CRUD) go fine (< 1 sec).

I sent a standalone test application, db access functions work very fast 
there.

The slow open time takes consistenly 4 minutes. This is a long time for 
almost anything to happen. Very little is happening besides the read 
from db file. And nothing that I can think of that would take 4 minutes.

(This operation is very fast i.e. couple of seconds on a local hd).

Any ideas of what the problem could be?

Thanks
Rael
0
Rael
7/1/2015 12:17:54 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

3 Replies
591 Views

Similar Articles

[PageSpeed] 30

My NAS goes to sleep after X time of no access. Then it takes a couple 
of minutes for it to spin up and Windows to read whatever it reads on 
startup. Fast until it sleeps again.
0
Mark
7/1/2015 4:56:11 PM
Check that the drives aren't 'Green' drives that spin down.  No good
for a NAS.

Ian
0
Ian
7/1/2015 10:15:41 PM
On Wed, 1 Jul 2015 05:17:54 -0700, Rael Bauer <rael@nospam.com> wrote:

>I have a user that complains of very slow open time when perform a 
>"File->Open" operation in my application over a NAS Drive. For the most 
>part, the File -> Open is accessing/reading a sqlite database file. Once 
>the file is "opened" other operations (CRUD) go fine (< 1 sec).

Typical "green" awareness consequence...
The NAS is spinning down the drives after some idle time and it takes
a long time to get them on line again when needed.
It might even be so bad as the NAS itself has no control over this,
instead the drive itself is doing it....

I had the same problem, not only for a specific program but for
everything accessing files on my Synology NAS AND on my 1TB extra data
drive in the laptop (replaced the seldom used DVD drive).

I looked in vain for a working solution in operating system settings
etc. Then I gave up and wrote a small Delphi program that has a timer
which is configurable. When it times out it opens a text file on the
target drive while measuring the time taken to do that.
Then it writes the trial number and check time as a new line into the
file and reads back the file. The time to access is displayed on the
program window. Note that I needed both a write and a following read
of the file to ensure that the operating system is not cheating on the
times by caching the write...

I also added housekeeping that makes sure the file does not grow
beyond a hundred lines or so.

I have set up this program to check both my NAS and the local hard
drive and after doing this I have a much more responsive system with
virtually no extra delays.
Right now the NAS check clocks in at the followin statistics:
- Number of checks after start: 34573 (at 10 s interval)
- Maximum access time: 2355 ms
- Number of longer than 16 ms accesses: 28291
- Average access time for long accesses: 22 ms

Here is the Timer code as an example, the FCheckFile variable is a
TStringList:
{code}
procedure TForm1.timCheckTimer(Sender: TObject);
var
  Ts, Te, Ta: Cardinal;
  TimeStamp: string;
begin
  timCheck.Enabled := false;
  try
    Inc(FTrialNo);
    if (FTrialNo mod 200) = 0 then
      FCheckFile.Clear;  //Keep file size under control
    stxTrialNo.Caption := IntToStr(FTrialNo);
    TimeStamp := FormatDateTime('yyyymmdd hh:nn:ss', Now) + '  Trial
#: ';
    FCheckFile.Add(TimeStamp + IntToStr(FTrialNo));
    Ts := GetTickCount;
    FCheckFile.SaveToFile(FTestFile); //<= Write operation
    FCheckFile.LoadFromFile(FTestFile); //<= Read operation
    Te := GetTickCount;
    Ta := Te - Ts;
    stxAccessTime.Caption := IntToStr(Ta);
    FAccessSum := FAccessSum + Ta;
    //Display statistics
    if Ta > 0 then
      Inc(FLongAccessCnt);
    if Ta in [1..16] then Inc(FAccessCount[1])
    else if Ta in [17..32] then Inc(FAccessCount[2])
    else if Ta in [33..48] then Inc(FAccessCount[3])
    else if Ta in [49..80] then Inc(FAccessCount[4])
    else if Ta in [81..128] then Inc(FAccessCount[5])
    else if Ta > 128 then Inc(FAccessCount[6]);
    if Ta > 0 then ShowCountSlots;

    if FMaxAccessTime < Ta then
      FMaxAccessTime := Ta;
    stxMaxTime.Caption := IntToStr(FMaxAccessTime);
    stxLongAccessCnt.Caption := IntToStr(FLongAccessCnt);
    if FLongAccessCnt > 0 then
      stxAvgLongTime.Caption := IntToStr(FAccessSum div
FLongAccessCnt);
  finally
    timCheck.Enabled := true;
  end;
end;
{code}


---
Bo Berglund
Sweden & Texas
Newsreader: Forte Free Agent 1.92/32.572
0
Bo
7/2/2015 6:29:09 AM
Reply:

Similar Artilces:

very slow connection to NAS drive
Hi, I have a user that complains of very slow open time when perform a "File->Open" operation in my application over a NAS Drive. For the most part, the File -> Open is accessing/reading a sqlite database file. Once the file is "opened" other operations (CRUD) go fine (< 1 sec). I sent a standalone test application, db access functions work very fast there. The slow open time takes consistenly 4 minutes. This is a long time for almost anything to happen. Very little is happening besides the read from db file. And nothing that I can think of tha...

SLOW SLOW SLOW #2
Name: Kris Email: lf-crathotmaildotcom Product: Firefox Summary: SLOW SLOW SLOW Comments: Hi there. I have been BETA testing Firefox 3.1b1 and just today 3.1b2. just so you know I am uninstaling this cause beta 2 sucks. it is the slowest browser ive ever used. hopefully this gets fixed. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for...

Slow, Slow, Slow #2
Name: Douglas Toates Email: douglasdottoatesatthomsonreutersdotcom Product: Firefox Summary: Slow, Slow, Slow Comments: What have you done to Firefox 3 - it runs like a dog ! Javascript especially seems to grind my whole PC to a halt ?? Also you've foolishly removed the "open directory" option from the download dialog - Why ? Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if ...

slow connection #2
I have an adsl modem acting as a bridge to my router my setup was working well for more than year now , but then the internet went slow . I set the modem back to PPPoE the problem was with the DNS server of the ISP so using ifup i set the dns t 8.8.8.8 (google) the connection is back , but when i set the modem back as a bridge slow internet does the router know that my dns is 8.8.8.8 or i should set the dns on the router ?:X I can't see an option to set the dns on the router ( i just enter my username and password from the isp to use PPPoE mode ) by the way i called the isp ...

slow connection #2
Name: peter Email: delsol922athotmaildotcom Product: Firefox Summary: slow connection Comments: Just after firefox updated itself, my Internet (100 mbps) has been extremely slow. I tried to uninstall and use ie, but that was slow as well. I'm not sure if the update triggered something more universal or if it's an unrelated "coincidental" issue. But I have spent the better part of the day cleaning registry and virus/spy scanning, while my offline is great the online is worse than dial up. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:...

Beta 2 SLOW SLOW SLOW
If I attempt to go into the debugger, without first bringing up the website without it, 90% of the time it will hang.   Performance has gotten slower and slower as we have increased the size of the application.  And we are not talking about that many pages or user controls. (20 pages, 15 user controls).  Most of the time the delay doesn't include any CPU utilization. Do you think it's a memory leak?  Does it start out ok when you boot and get slower thru the day, or is consistently slow? It starts out slow.  What version are you using? I recall an earlier...

How to connect to nas network drive?
on ubuntu and windows I use this ip to connect to a nas network windows workgroup *smb://192.168.0.1/share/* on opensuse KDE I have tried from dolphin's network all options but none work so how? -- gandaran ------------------------------------------------------------------------ You started and configured Samba? I ask because you do not say you did anything like that. Look here for a good tutorial: 'openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna' (http://opensuse.swerdna.org/) -- Henk van Velden -------------------------------------------------...

slow connecting to web sites #2
Name: walter jones Email: wjones 956atcomcastdotnet Product: Firefox Summary: slow connecting to web sites Comments: I have a self built desktop apox 1-yr old AMD 64 Athlon, 160 GIG HD, w/ sony Multi DVD RW recorder ... using PCLinuxOS 2007 operating system. I love the new features of this beta 3 Firefox but the site connecting time takes longer which gives a much slower feel. Another thing that bothers me is if you accidentally double-click ... it won't disregard the 2nd click ...it stacks the command and locks up Firefox which requires you to reboot or go to the tray...

11.2 cifs connection to NAS
Help please. I have installed 11.2 (64 bit on a laptop running AMD 64 *2)and can not get cifs to work correctly. I have verified my setup with the Swerdna HowTo, and have searched and searched the forums for a similar situation. I have a NAS (Pleiades which does not support Unix Extensions) Under 11.0 I have to disable LinuxExtensions and mount the drive in a separate script at boot time. Now with the nounix option it looks promsingly like itshould work as a normal auto mount. I have played with various firewall settings but at the mo it is off. The mount target /storage...

General advice on 2 Internet connections
Due to dissatisfaction with our current Internet connection we are considering getting a 2nd connection (512/256 ADSL) to help relieve some issues until we can get them sorted out over the existing connection. We are comtemplating something along the lines of using the 2nd connection for iFolder and/or NetStorage services (initially with only a few users). These services are currently running on the only NW6 server in our environment which is also running BM37SP?. All files accessed through NetStorage are on other servers within the LAN except the iFolder files. To lower the proc...

Connection time is too slow in EAS5.2 !
Hi, I will check connection time to EAServer in PB. When connect to EAS5.2 (build 52025), time is 40 seconds. When connect to EAS4.2.5 (build 42506), time is 2 seconds. These EAServer are installed in same server and all properties ard default. Is there a issue about connection ? TIA. We use eas 5.2 on many projects and we have never seen this issue so something is configured incorrectly. How are your listeners configured? Can you resolve the server machine from the client quickly? If the name/IP your using to resolve the server machine the same as the listener? ...

downloaded 3.5 SLOW SLOW SLOW 2 open
Name: pamela Zober Email: pamz18atcoxdotnet Product: Firefox Summary: downloaded 3.5 SLOW SLOW SLOW 2 open Comments: horrible, Foxfire is usually great - please fix and I am gonna try to go back to earlier version - 3.5 makes IE 8 look like a rocket ship!!!! how bad is that? Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to se...

slow, slow, slow!!!
Name: Phil Mishler Email: pmish20atgmaildotcom Product: Firefox Release Candidate Summary: slow, slow, slow!!! Comments: Just installed Firefox 3.6 beta 5. Three times I closed it out and reloaded. Each time it took 2 min. 15 sec. to load. Chrome takes 2 seconds. Guess which I will use. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5 (.NET CLR 3.5.30729) From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (...

Slow, slow, slow
Name: Joe Goddard Email: sgoddar1atsandotrrdotcom Product: Firefox Summary: Slow, slow, slow Comments: I just installed Firefox 3 beta 1. The start up is still painfully slow compared to Safari. Is this software "bloat"? Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O 10.4; en-US; rv:1.9b1) Gecko/2007110903 Firefox/3.0b1 ...

Web resources about - very slow connection to NAS drive #2 - embarcadero.delphi.general

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Ben Garcia gives Penrith Panthers a new French connection
Should he jag a game in the NRL, Ben Garcia will become just the third genuine French import to do so.

Man Charged With Aggravated Arson In Connection To Columbus Warehouse Fire
Police have charged 30-year-old Robin Toms with aggravated arson.

Facebook becomes more adept at dealing with crappy connections
... to get a decent phone signal to allow you to post a photo of your meal. Joking aside, in countries where people are struggling with 2G connections ...

Adam Savage from 'MythBusters' has an incredible connection to the 'Star Wars' franchise
Adam Savage, co-host of the popular " MythBusters " television show, soured on the plot of "Interstellar." But when it comes to the newest films ...

French authorities detain suspects in connection to attacks 10 months apart
CNN French authorities detain suspects in connection to attacks 10 months apart CNN A forensic scientist works near a Paris cafe on Saturday, ...

UK Police Make Arrest in Connection With VTech Hacking
British law enforcement officials arrest a 21-year-old man in connection with attack on toy maker VTech that exposed 6 million parents and children ...

Resources last updated: 12/23/2015 4:18:58 AM