• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Help!SSD write cost too much time

simaocat

New Member
Joined
Jul 12, 2024
Messages
2 (0.09/day)
Recently I have been conducting some write tests based on SSD hard drives. The background is as follows: I developed a simple file upload server using the Go language. The key code is as follows:
for each uploaded file, a UUID is generated as its ID. To ensure that there are not too many files in a directory, I use the first two characters of the UUID as the first-level directory, and the next two characters as the second-level directory. The file name inside the second-level directory is the UUID itself, and the size generally does not exceed 500MB, usually 10MB. By printing the time spent at each step, I found that the IO.copy takes the most time, reaching up to several tens of seconds at most, but at this time, the system is not under much pressure. By tracking with blktrace, I found that the MAX indicator of the Q2G item is very large. I would appreciate it if any expert could help me take a look at what the problem is. Thank you very much.
 

Attachments

  • 3.png
    3.png
    482 KB · Views: 68
  • 1.jpg
    1.jpg
    1.2 MB · Views: 67
  • 2.png
    2.png
    352.8 KB · Views: 68

mannyribera

New Member
Joined
Jul 14, 2024
Messages
9 (0.43/day)
Hi mate.

I'm quite busy but i took the time and i have analyzed step by step IO time transfers. I can only say from the hardware perspective that the ssd drive itself is fine and all copy transfers times are in the correct norms...
 
Last edited by a moderator:

simaocat

New Member
Joined
Jul 12, 2024
Messages
2 (0.09/day)
.i would suggest format brain.exe.
my os version:
Linux version 5.4.0-153-generic (buildd@bos03-amd64-008) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023

my go version:
go version go1.22.4 linux/amd64

my hardware ssd version:
Model Number: INTEL SSDPF2KX038TZ
Firmware Version: JCV10300
PCI Vendor/Subsystem ID: 0x8086
IEEE OUI Identifier: 0x5cd2e4
 
Top