[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ILA-NFS



    Date: 24 Jan 89 11:51 -0800
    From: razzell%vision.ubc.cdn%relay.ubc.ca@warbucks.ai.sri.com (Dan
	  Razzell)

    > Date: 20 Jan 89 12:04:00 WET
    > From: mcvax!control.lth.se!karlerik@uunet.UU.NET (KARL-ERIK ]RZEN)
    > Subject: ILA-NFS
    > ...
    > What is the price in performance?

    Apart from the validation phase, we've noticed about a factor of eight
    slowdown in reading image files using NFS as compared with TCP/IP. The
    images are 1K x 1K x 8BPP stored on a Unix host. I haven't looked into
    this yet, and it may improve through tuning the transfer size parameters.

You should be getting approximately 40 KB per second read rates with NFS.
If you aren't, then something is wrong.

Run this function a few times:

(defun io-performance-test (pathname)
  (setq pathname (fs:parse-pathname pathname))
  ;; Make sure everything is all started up
  (probe-file pathname)
  ;; Check write performance
  (let* ((bufsize 1024)
	 (nbufs 1024)
	 (buffer (make-array bufsize :element-type '(unsigned-byte 8)))
	 (starting-time (time:time)))
    (with-open-file (stream pathname :direction :output :element-type '(unsigned-byte 8)
			    :if-does-not-exist :create :if-exists :overwrite)
      (loop for i from 1 to nbufs do (send stream :string-out buffer)))
    (let ((seconds (/ (float (time:time-difference (time:time) starting-time)) 60.0))
	  (bytes (* bufsize nbufs)))
      (format t "~&Wrote a file of ~D bytes in ~D seconds for ~D bytes-per-second.~%"
	      bytes seconds (/ bytes seconds))))
  ;; And read performance
  (let* ((bufsize 1024)
	 (nbufs 1024)
	 (buffer (make-array bufsize :element-type '(unsigned-byte 8)))
	 (starting-time (time:time)))
    (with-open-file (stream pathname :direction :input :element-type '(unsigned-byte 8))
      (loop for i from 1 to nbufs do (send stream :string-in nil buffer)))
    (let ((seconds (/ (float (time:time-difference (time:time) starting-time)) 60.0))
	  (bytes (* bufsize nbufs)))
      (format t "~&Read a file of ~D bytes in ~D seconds for ~D bytes-per-second.~%"
	      bytes seconds (/ bytes seconds)))))

Here I get results like this with NFS:

  (io-performance-test "wh:/wh/cjl/testfile")
  Wrote a file of 1048576 bytes in 83.71667 seconds for 12525.296 bytes-per-second.
  Read a file of 1048576 bytes in 20.616667 seconds for 50860.598 bytes-per-second.
  NIL

For TCP-FTP:

  (io-performance-test "wh:/wh/cjl/testfile")
  Wrote a file of 1048576 bytes in 21.433332 seconds for 48922.676 bytes-per-second.
  Read a file of 1048576 bytes in 18.7 seconds for 56073.582 bytes-per-second.
  NIL

And for NFILE to a 3650:

  (io-performance-test "B:>cjl>testfile.dat")
  Wrote a file of 1048576 bytes in 28.383333 seconds for 36943.37 bytes-per-second.
  Read a file of 1048576 bytes in 24.916666 seconds for 42083.32 bytes-per-second.
  NIL