Select to view content in your preferred language

Arcpy VERY slow when using our new SAN

08-02-2023 05:14 AM
Occasional Contributor

Last autumn we deployed a new SAN at our org. Ever since then any of my Python utilizing acrpy that writes to, or references, a directory on that SAN using the complete UNC path (//SAN/DIRECTORY/SUB-DIRECTORY/SUB-SUB-DDIRECTORY/ etc.) runs exceptionally slow. However, if I use the drive letter for the path it runs at normal speeds.  And when I say slow, I mean when it would normally take a minute or two it now takes an hour or more. And it seems to be limited to the arcpy module. 

Below are some run times using UNC/drive letter and shutil/arcpy. The shell utilities module is used to copy a directory with shapefile files in it to the SAN. Arcpy is used to export a featureclass to a shapefile in a directory on the SAN.

Drive Letter and shutil:                                   0.4070 mins

UNC and shutil:                                               0.400 mins

Drive Letter and arcpy:                                   0.150 mins

UNC and arcpy:                                               103.14 mins

Most of this involves my data management Python that runs on a server.  I've rewritten it so arcpy doesn't reference or write anything on the SAN.  I just works with the local hard drive.  I then use other Python libraries to move, and work with, data on the SAN.

Anyone else experience this?  If I had to guess it has something to do with the config of the new SAN.  

Tags (3)
2 Replies
MVP Esteemed Contributor

what parts of arcpy are you using?  Do you need a full import or just bits?

for example

import arcgisscripting as ags       # -- arcgisscripting module
from arcpy.geoprocessing import gp  # -- geoprocessor
from arcpy.geoprocessing import env # -- environments

limiting the imports to what you need may help you narrow down something in the arcpy environment.

The import path can be explored in the modules and in your installation path

(local install shown)

C:\...Install Folder...\Resources\ArcPy\arcpy

... sort of retired...
0 Kudos
Occasional Contributor

I had this problem if I was writing any data to the SAN, accessing data on, or writing data to, the SAN (shapefiles, File GDB, .loc files, any package files, and even .sde connection files). 

I'm working around the problem and probably won't visit again until we upgrade to 3.0.  I posted here to see if anyone else experienced this or if maybe someone at Esri had thoughts.

0 Kudos