Project

General

Profile

Actions

Backport #5585

closed

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

Added by arton (Akio Tajima) over 12 years ago. Updated about 12 years ago.

Status:
Closed
[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 1 (0 open1 closed)

Backport #5592: ruby-1.9.3-p0 mswin IO#write still slower than 1.9.2 Closed11/08/2011Actions
Actions #1

Updated by usa (Usaku NAKAMURA) over 12 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]

Actions #2

Updated by usa (Usaku NAKAMURA) over 12 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) over 12 years ago

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

レビュー待ち。

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

Actions #4

Updated by arton (Akio Tajima) over 12 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) over 12 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秒)から大幅な向上です。

Actions #6

Updated by arton (Akio Tajima) over 12 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]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0