cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Nfs Slow

 
SOLVED
Go to solution
Highlighted
Valued Contributor

Re: Nfs Slow

Ok the last test :
In my nfs Server :


In my nfs Client :

The problem could be a file system exported from a Server and not NFS?
The file system in the nfs server are degraded from export or no ?
I still check READDIR and READDIR+?
Highlighted
Valued Contributor

Re: Nfs Slow

ops

last test on my server :
time ll|wc -l

real 6:39.5
user 18.6
sys 1:18.7
522511

last test from my client :
time ll|wc -l

real 13:17.6
user 18.6
sys 38.5
522487
Highlighted
Honored Contributor

Re: Nfs Slow

Is pwgr running on the server ?
The problem is caused by collecting all info on the files and translating things like userid's and groupid's to the end-user-readable form with usernames and group names.

You might try something like 'ls -nl' to see if it's faster. If that is faster, tools like pwgr and nscd might help.
Every problem has at least one solution. Only some solutions are harder to find.
Highlighted
Valued Contributor

Re: Nfs Slow

Good idea ...
but :-( same result :

from a server
ls -nl|wc -l

real 6:32.2
user 18.1
sys 1:18.9
522709
Highlighted
Honored Contributor

Re: Nfs Slow

Then you already have some caching daemon running...

But with 522000 files being questioned within 400 seconds, with date-conversion and all, your system isn't as slow as you suspect...

If you calculate the time per directory entry, it is comparable with the times I need on a local filesystem per file...
The only difference is the caching on local filesystems: when running the same time ll command again, the directory information is cached, resulting in a really quick response. Since NFS is not really cachable, that doesn't work. You might look at the ac* mount options, but I don't think they really help with this number of files.

If you really need it faster, and the storage is only used on this server, you might think about using different protocols for accessing the data, for instance iSCSI.
Every problem has at least one solution. Only some solutions are harder to find.
Highlighted
Honored Contributor

Re: Nfs Slow

As mentioned before, 550k files is a terrible design but sometimes you are stuck with it. What is worse is that NFS makes this even slower. So there are two fixes:

1. DON'T use ll. Instead, create your own hash table or file index and look at the index to find the matches. Convenient? Probably not, but this is a side effect of a bad design.

2. Change your network to 10 Gbit links, switches and routers. Also, change the storage for the 550k files to a RAMdisk appliance. And if necessary, upgrade your computer to more and faster processors.

Either of these should improve performance. Did I mention that these choices are the result of a bad directory design?


Bill Hassell, sysadmin
Highlighted
Valued Contributor

Re: Nfs Slow

another test do similiar result between client and server:

SERVER
real 5:44.8
user 18.1
sys 1:14.9
521782

CLIENT
real 7:50.1
user 19.1
sys 1:22.9


uhhmm ?
Occasional Advisor

Re: Nfs Slow

Hello Bill,

What would be a good directory design?

I'm facing a situation at customer site, where thousands of files in several directories.

Can you please advice me about NFS directory tree design for better performance.

Thank you.