Project

General

Profile

Backport #5585

windowsでファイルへの書き込みが異様に遅い

Added by arton (Akio Tajima) about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:44819]

Description

r31901の修正により、io_binwriteの呼び出しの都度呼び出されるio_fflush内でfsyncがかかり、ファイルへの書き込みが極度に遅くなります。
(ruby-1.9.3-p0も同様)


Files

io.c.patch (1.18 KB) io.c.patch arton (Akio Tajima), 11/07/2011 09:17 PM

Subtasks

Backport #5592: ruby-1.9.3-p0 mswin IO#write still slower than 1.9.2 ClosedActions

Associated revisions

Revision 66595f38
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 33651
Added by usa (Usaku NAKAMURA) about 8 years ago

  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

Revision 547584dd
Added by arton (Akio Tajima) about 8 years ago

  • io.c (io_fflush): remove fsync().
  • io.c (rb_io_flush, rb_io_rewind): fsync() here. These pathces are backports of trunk r33651 for [Bug #5585]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33658
Added by arton (Akio Tajima) about 8 years ago

  • io.c (io_fflush): remove fsync().
  • io.c (rb_io_flush, rb_io_rewind): fsync() here. These pathces are backports of trunk r33651 for [Bug #5585]

History

#1

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33651.
Akio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • io.c (io_fflush): remove fsync().

  • io.c (rb_io_flush, rb_io_rewind): fsync() here.

these changes reduces fsync() calls to improve performance.
first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
[Bug #5585]

#2

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (core)
  • Status changed from Closed to Open
  • Target version deleted (2.0.0)

1.9.3にバックポートが必要だそうです。

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Status changed from Open to Assigned
  • Assignee changed from usa (Usaku NAKAMURA) to arton (Akio Tajima)

レビュー待ち。

バックポート作業自体はyuguiさんがするのかしら。

#4

Updated by arton (Akio Tajima) about 8 years ago

trunkの修正を元にした添付パッチの以下について確認しました。
 ・io.cで問題となっている箇所からのfsyncの除去と、rb_io_flushおよびrb_io_rewindへのfsyncの追加
 ・ioのテストのパス
 ・100MBファイルの書き込みがそれほど遅くないこと
・x64-mswin64で[ruby-list:48515]のスクリプトで以下を得ました。
Write:1.639093(s)
Read :1.672095(s)

ステータスとして、「confirmed」とか「reviewed」とかが要るのかな?

Updated by arton (Akio Tajima) about 8 years ago

先のエントリの修正:
trunkの修正を元にした添付パッチの以下について確認して、期待した修正であることを確認しました。
 ・io.cで問題となっている箇所からのfsyncの除去と、rb_io_flushおよびrb_io_rewindへのfsyncの追加→されています。
 ・ioのテストがパスすること。→パスしました。
 ・100MBファイルの書き込みがそれほど遅くないこと
・x64-mswin64で[ruby-list:48515]のスクリプトで以下を得ました。
Write:1.639093(s)
Read :1.672095(s)
 これは、パッチ前のWriteの所要時間(約180秒)から大幅な向上です。

#6

Updated by arton (Akio Tajima) about 8 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r33658.
Akio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • io.c (io_fflush): remove fsync().
  • io.c (rb_io_flush, rb_io_rewind): fsync() here. These pathces are backports of trunk r33651 for [Bug #5585]

Also available in: Atom PDF