Thursday 15 September 2011

asp.net - multithreading in c# -


I'm new to threading. My boss gave me a scenario. We have a list of objects which is 0f 70gb, we want to load it from the database. It takes time that I want to use a CPU (multi threading) in this scenario. Compared to the second part, when the part of the part is loaded, while the first part is processed, what should I do, what should I do.

itemprop = "text">

Do you have control over how the data loads in the database, and how does the hardware look?

To load 70 GB data, you will be binding I / O for the first time. If the data remains in the same quantity, trying to use multiple threads, the disk head will be beaten because they seek back and backward in the drive.

This means that your first step should be maximum performance of your disk subsystem. You can restrict the size of your disk partition to the first of the drive

  • Any spindle applied The more you can do in a larger rack:

    1. Using the High Speed ​​Disk Controller
    2. Using Multiple Disk Controllers
    3. The amount of up to the speed of your disk controller
    4. / li>
    5. Your Spread the drive between several controllers

    Once you are in that part, the next step is to divide your data into as much as possible disks and controllers, While still allowing your log file to be self on a volume if you can fill two whole controllers with fast RAID versions, you can split your data between them. In some cases, it can help to use SQL Server's table split mechanism to help with the process and may force parts of the table on some physical versions.

    After partitioning, you

    once you are bound to the previous I / O, then you start thinking about ways to optimize the CPU side You can. Things - but it is quite unusual to go to that point.

    Depending on the speed you need, this type of thing can be complex (and expensive) early ....

    If it helps, I discuss in detail in my book on many issues of facilities.


  • No comments:

    Post a Comment