Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

the performance of libeio #1446

Closed
changchang opened this issue Aug 3, 2011 · 2 comments
Closed

the performance of libeio #1446

changchang opened this issue Aug 3, 2011 · 2 comments
Labels

Comments

@changchang
Copy link

I found nodejs use libeio as file system aio lib. And the latter uses threads and synchronous io to implement aio. I read this mail list http://groups.google.com/group/nodejs/browse_thread/thread/aff97d25c59f6f2d and I think that it may be a trade off between portability and performance. But I'm worry about that file io would become the performance issues.

I try to do some test for file reading in my pc. I start 100 concurrent requests to read a file which size is 1.5M 10,000 times.
And the result of throughput is that 6MB/s per request in nodejs while 280MB/s in Java.
Does that mean nodejs is not suitable to do intensive tasks for file io?
Is there any suggestion to tune the performance of file io in practice?

Sorry for rehashing this old discussion.
Thank you and good luck :)

@bnoordhuis
Copy link
Member

And the result of throughput is that 6MB/s per request in nodejs while 280MB/s in Java.
Does that mean nodejs is not suitable to do intensive tasks for file io?
Is there any suggestion to tune the performance of file io in practice?

It's true, file I/O is far from perfect right now.

I have some ideas on how to implement asynchronous I/O on Linux using native AIO (not POSIX AIO) but that won't be a general solution: AIO on Linux only works with files opened in O_DIRECT a.k.a. skip the page cache mode. That's acceptable for write-heavy workloads but it positively sucks for read-heavy loads because every read hits the slow, slow physical disk.

AIO is an area where Windows is likely going to run circles around the Unices...

@sh1mmer
Copy link

sh1mmer commented Nov 3, 2011

Thanks for the feedback. Since this isn't directly actionable I'm going to close.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants