![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pattern matching | mercuryshipzz | Shell Programming and Scripting | 4 | 01-14-2008 11:01 PM |
| AWK pattern matching, first and last | smb_uk | Shell Programming and Scripting | 10 | 12-27-2007 09:03 PM |
| pattern matching | malle | Shell Programming and Scripting | 3 | 01-31-2007 05:23 AM |
| pattern matching | larryase | UNIX for Dummies Questions & Answers | 3 | 11-22-2004 06:54 PM |
| Pattern Matching | danhodges99 | UNIX for Dummies Questions & Answers | 2 | 02-27-2003 03:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Slow pattern matching ls or rm in a large directory
Hello! I'm new here so hopefully I'm posting in the right forum.
Got a storage that is NFS mounted to a Sun box running Solaris 8. When I run a pattern matching ls or rm, it will take as long as 1-2mins to complete. Patterns are usually consist of prefix and a *, for example... "ls -l abc123*" or "rm -f abc123*" Pattern matching ls or rm will be nearly instant the 2nd time I run it, but 1-2mins the 1st time. The directory is huge. Contains some 100k to 500k small 20k sized files. I get really fast response if I ls or rm with the exact file name. Is this normal? I was told it's a bandwidth issue but I could transfer a large 180MB file to the NFS storage in 10secs. Any help much appreciated. |
|
||||
|
Quote:
|
|
|||||
|
Quote:
|
|
||||
|
Quote:
On a local disk, it will take about 1-3 sec to complete the call. I understand that NFS mounted storage will be slower but from 1-3 secs to 2-5 mins? |
|
||||
|
Quote:
When I search for a specific file in the directory... I get instant response. It's when I search for files using a wild card that I get very very poor performance... (Say file abc12345.html vs abc123*.html) |
|
|||||
|
The issue is with the wildcard itself, take a look at glob(), consider 100 000 system glob() calls, add NFS latency, RPC calls, slow network, overloaded server, and you'll get the answer, whereas strict file match is a different thing. "Is the file there - yes / no" - pretty simple.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|