Improve module performance by reducing disk reads

Improve module performance by reducing disk reads

Post by Dave Ange » Tue, 31 Mar 2009 22:17:50

Since the email contains no code, I can only assume you're using the
bult-in open() call, and If you didn't specify a bufsize,
a "system default" is used. I seriously doubt if 0 is the default.

Since it's already buffered, additional buffering by you might have
little effect, or even negative effect. I'd suggest explicitly
specifying a buffer size in the open() call, starting with 4096, as a
good starting place. Then I'd do benchmarks with larger and smaller
values, to see what differences it might make.

The only time additional buffering tends to be useful is if you know the
file usage pattern, and it's predictable and not sequential. Even then,
it's good to know the underlying buffer's behavior, so that your
optimizations are not at cross purposes.

I'd expect your performance problems are elsewhere.

1. Can reducing number of tables improve performance?

2. [News] Linux Kernel Hackers Look Ahead at 2.6.24, Improve Performance, Reduce Complexity

InfiniBand/RDMA 2.6.24 Merge Plans

,----[ Quote ]
| "With 2.6.24 probably opening in the not-too-distant future, it's probably a
good time to review what my plans are for when the merge window opens," began
Roland Dreier on the Linux Kernel mailing list.

CFS, Focusing on Simplification and Performance

,----[ Quote ]
| Having recently returned from the Linux kernel summit, Ingo Molnar and Peter
| Zijlstra sent out some performance updates to the Completely Fair
| Scheduler...


CFS scheduler to appear in Linux kernel 2.6.23

,----[ Quote ]
| And also credit where credit's due, Con Kolivas was the first one to
| prove via RSDL/SD that 'fair scheduling' is possible and that it
| results in better desktop scheduling.

3. improving python performance by extension module (64bit)

4. How to improve the performance of "Hard Disk"

5. Improving disk performance

6. How to improve disk operations performance in Virtual PC?

7. Improving Harddisk Performance for Concurrent Disk-Operations

8. How to improve disk performance?

9. Does running disk cleanup regularly improve performance?

10. How to improve NFS client write/read performance?

11. How IO overlapped with Createfile ,Read file ,write file will improve IO performance..?

12. Improve performance while reading from a BufferedReader.

13. How to improve performance when reading text files?

14. How IO overlapped with Createfile ,Read file ,write file will improve IO performance..?

15. [PATCH] selinux: Improving SELinux read/write performance