Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I met a puzzle on coding a zero data program for many disks under a multi-thread case. The low-level component is written by C && SCSI WRITE and it is called by a JAVA mulit-thread program(One Disk one thread).
I found that 15 threads around can reach to 60MB/Sec Zero Speed whereas 30 threads around could only get 30MB/Sec or so. That's to say, the more threads involved, the slower speed it could get. On the same time, CPU load was sticked to 32-37% and Mem at 0.6% only no matter 15 or 30 threads running[TOP Showed]. It seems that there is still some room to improve. But I have no idea where I SHOULD fix. Could anyone shed a light on it
"On the same time, CPU load was sticked to 32-37% and Mem at 0.6% only no matter 15 or 30 threads running[TOP Showed]. It seems that there is still some room to improve. But I have no idea where I SHOULD fix."
The fact that the CPU maxed at 32-37% means that the CPU is not the critical resource. The fact that the Mem maxed at 0.6% means that the Mem is not the critical resource. Check the other components that you are using to see if one of them hits 100% usage. Some possible critical resources are disk arm movement, network speed, and video buffer access.
there are various scheduling algorithms to choose from in the kernel config.
some grant a lower level of latency in getting to interupts others give faster throughput and a higher level of latency. You can also try different levels of hardware latency "setpci".
different size buffers might effect burst size as well.
also remember you have realtime threads if you need it to controll scheduling.
I am clearer about TOP result from your notes. One of the critical resources is Disk itself, I bet. In some degree, SCSI WRITE(10) I used have stressed the disk to reach its max write speed because SCSI Command works on disk directly and there is no other barrier to be involved. If really have, PCIe HBA card(Disk Channel) could be considered. However, I have no clue on it.
Like studioj suggested, for the moment, I can give it a shot on kernel config and choose another scheduling algorithms. In my case, IO process performance is more important.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.