Official eMule-Board: V0.70a/b Writes Too Much Part.met Part.met.bak Files - Official eMule-Board

Jump to content


Page 1 of 1

V0.70a/b Writes Too Much Part.met Part.met.bak Files too much disk activity

#1 User is offline   ducho 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 103
  • Joined: 22-October 06

Posted 10 October 2024 - 03:06 AM

I updated from 0.60d to 0.70a/b recently. I noticed a huge disk activity, around 1.2 MB/s sustained write in my temporary folder.
Upon investigation, it was determined that writing .part.met and .part.met.bak files was the culprit.

I would say that the bigger issue is update .part.met and .part.met.bak files without any change to .part itself.
I do believe that we could trigger updates to .part.met and .part.met.bak only after some change to .part file.

There is also a lot of refactoring, i.e. CPartFileWriteThread, and more updates that I didn't look at.
I need to find time to update libraries to compile 0.70b to experiment.

This post has been edited by ducho: 10 October 2024 - 03:30 AM

0

#2 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5016
  • Joined: 13-May 07

Posted 10 October 2024 - 10:37 AM

What was download rate while writing at 1.2 MB/s?
0

#3 User is offline   ducho 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 103
  • Joined: 22-October 06

Posted 10 October 2024 - 09:39 PM

Download rate was zero. If something was downloading sporadically I am sure it didn't go higher than 50 KB/s.
I have 1225 files on download list,
then I have 1225 x 2 (.met & met.bak) rewritten in 62 seconds - this value from comparing timestamps.

Total size of 2450 files is 461,916 bytes o.O
I can start emule again and maybe it is possible to measure more accurately how many times per second each file is written.

This post has been edited by ducho: 10 October 2024 - 09:41 PM

0

#4 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 578
  • Joined: 22-November 04

Posted 11 October 2024 - 02:25 AM

Current community version calls FlushBuffer() regularly even if there's no data in the buffer.
	// If buffer size exceeds limit, or if not written within time limit, flush data
	if (m_nTotalBufferData > thePrefs.GetFileBufferSize() || curTick >= m_nLastBufferFlushTime + thePrefs.GetFileBufferTimeLimit())
		FlushBuffer();


should be like
	if (m_nTotalBufferData == 0)
		m_nLastBufferFlushTime = curTick;
	else
		// If buffer size exceeds limit, or if not written within time limit, flush data
		if (m_nTotalBufferData > thePrefs.GetFileBufferSize() || curTick >= m_nLastBufferFlushTime + thePrefs.GetFileBufferTimeLimit())
			FlushBuffer();

1

#5 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5016
  • Joined: 13-May 07

Posted 16 October 2024 - 08:46 AM

This is questionable for official, and unacceptable for 0.70.
0

#6 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 578
  • Joined: 22-November 04

Posted 17 October 2024 - 12:37 AM

What's not acceptable for this kind of practical optimizations of avoiding unnecessary disk ios?

I found no obvious bugs regarding to similar logic that has been applied to my mod for quite several years.

I just checked the .part.met files and found no change since previous time eMule started to run for those without download data in current session. Actually I am thinking about even further optimization by not re-writing .part.met files unless the downloading file has actually downloaded something in this session.

This post has been edited by Enig123: 17 October 2024 - 12:38 AM

0

#7 User is offline   ducho 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 103
  • Joined: 22-October 06

Posted 17 October 2024 - 04:00 AM

I did run again for 29 minutes.

Only 2 files, $LogFile and $Mft had together 0.69MB/s writing, measured with Procmon. Total disk writings were double than that.
This makes sense as small files are written directly on MFT.

Is it useful to present additional data?
0

#8 User is offline   ducho 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 103
  • Joined: 22-October 06

Posted 11 November 2024 - 02:25 AM

So I moved back to 0.60d to try to reproduce the issue with 0.70.
All part files have been recreated - it looks like 0.70 has a new format. I didn't see any mention in release notes.

So 0.60d is online and disk activity is negligible while eMule is idling waiting for connections.
0

#9 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5016
  • Joined: 13-May 07

Posted 13 November 2024 - 11:25 AM

First of all, 1250 active downloads is orders of magnitude above recommended numbers (most should be stopped, and enabled option to start next when download completed).
On the other hand, it helped to disclose a problem.

Things should be improved in the next release, and thanks for the report.
2

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users