<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'how to read and write  file faster?' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'how to read and write  file faster?' posted on the 'C and C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 05:02:43 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 05:02:43 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>how to read and write  file faster?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422520/how-to-read-and-write--file-faster/</link>
      <description>how to read and write file on the disk faster?&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422520/how-to-read-and-write--file-faster/</guid>
      <pubDate>Thu, 17 Mar 2011 05:55:14 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422633/this-post-has-been-deleted/#422633</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422633/this-post-has-been-deleted/#422633</guid>
      <pubDate>Mon, 21 Mar 2011 21:16:31 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: how to read and write  file faster?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422659/re-how-to-read-and-write--file-faster/#422659</link>
      <description>I want to use multi-thread,but I have some questions.&lt;br /&gt;
1. If read one large file(500G) with multi-thread,can it accelerate the speed?&lt;br /&gt;
2.If read many files and each thread read one,can it accelerate the speed?&lt;br /&gt;
3.If the multi-thread program would accelerate the speed,Must it run on multi-CPU? what about on multi-kernel?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422659/re-how-to-read-and-write--file-faster/#422659</guid>
      <pubDate>Tue, 22 Mar 2011 17:15:05 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422661/this-post-has-been-deleted/#422661</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422661/this-post-has-been-deleted/#422661</guid>
      <pubDate>Tue, 22 Mar 2011 18:17:43 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: how to read and write  file faster?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422723/re-how-to-read-and-write--file-faster/#422723</link>
      <description>: I want to use multi-thread,but I have some questions.&lt;br /&gt;
: 1. If read one large file(500G) with multi-thread,can it accelerate &lt;br /&gt;
: the speed?&lt;br /&gt;
&lt;br /&gt;
Assuming that you are working with a multi-core CPU and lock the critical location of what is being read, but if you are reading one file in a concurrent manner are you really able to process the file? Unless the file is created to have X size bytes read concurrently and processed reading a single file on multiple threads might be pointless.&lt;br /&gt;
&lt;br /&gt;
: 2.If read many files and each thread read one,can it accelerate the &lt;br /&gt;
: speed?&lt;br /&gt;
&lt;br /&gt;
Yes, reading one file per thread could speed up the processing of the files. Given either a single-core or multi-core threading system.&lt;br /&gt;
&lt;br /&gt;
: 3.If the multi-thread program would accelerate the speed,Must it run &lt;br /&gt;
: on multi-CPU? what about on multi-kernel?&lt;br /&gt;
&lt;br /&gt;
Multi-threading on a single core uses the concept of time-slicing to fake multiple-threads, so it can potentially speed up the program depends on what's going on.&lt;br /&gt;
&lt;br /&gt;
Multi-kernal - I don't know how to answer that question.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422723/re-how-to-read-and-write--file-faster/#422723</guid>
      <pubDate>Thu, 24 Mar 2011 17:02:30 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: how to read and write  file faster?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422783/re-how-to-read-and-write--file-faster/#422783</link>
      <description>&lt;span style="color: Blue;"&gt;When dealing with a single hard drive - multithreading may be slower. No matter how many CPU or cores you have - a single physical drive may cause excessive wear on the drive and slow processing.&lt;br /&gt;
&lt;br /&gt;
Consider this: two threads read two files, separated physically by some amount of sectors. The hard drive heads must move to the 1st file and read the part of it, then next thread comes and heads move to 2nd file sectors, then process repeats - probably a lot of times - depends on a size of the part of the file being loaded. Since there is only one set of drive heads and it cannot be really shared at run-time (like CPU cores) - some thread always will wait until other thread is moving these heads.&lt;/span&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422783/re-how-to-read-and-write--file-faster/#422783</guid>
      <pubDate>Sat, 26 Mar 2011 05:06:16 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422833/this-post-has-been-deleted/#422833</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422833/this-post-has-been-deleted/#422833</guid>
      <pubDate>Mon, 28 Mar 2011 12:20:07 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>Re: how to read and write  file faster?</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/422841/re-how-to-read-and-write--file-faster/#422841</link>
      <description>thk u very much.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/422841/re-how-to-read-and-write--file-faster/#422841</guid>
      <pubDate>Tue, 29 Mar 2011 01:43:38 -0700</pubDate>
      <category>C and C++</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/CandCPP/422520/423312/this-post-has-been-deleted/#423312</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/CandCPP/422520/423312/this-post-has-been-deleted/#423312</guid>
      <pubDate>Tue, 19 Apr 2011 06:25:29 -0700</pubDate>
      <category>C and C++</category>
    </item>
  </channel>
</rss>