Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mscholz
    Member
    • May 2010
    • 13

    Bowtie2 shared memory (--mm)

    Anyone knows how this bad boy works? The manual is less than informative.

    How do different threads know the shared memory is there? What's the deal???

    Help?
  • nilshomer
    Nils Homer
    • Nov 2008
    • 1283

    #2
    Originally posted by mscholz View Post
    Anyone knows how this bad boy works? The manual is less than informative.

    How do different threads know the shared memory is there? What's the deal???

    Help?
    I would presume that the main thread memory maps the index file so that the index is treated as though it is in primary memory. Then the main thread needs only give a pointer to this memory to each thread. This is no different than if it had just read the index into memory. That's the beauty of memory mapping, as it is as though the file is in memory from the point of view of the process.

    For shared memory, typically a key is used to associate a shared memory segment (google shmget for example). Given this key, a process can attach the shared memory to its own process memory.

    Comment

    • tonybolger
      Senior Member
      • Feb 2010
      • 156

      #3
      Originally posted by mscholz View Post
      Anyone knows how this bad boy works? The manual is less than informative.

      How do different threads know the shared memory is there? What's the deal???

      Help?
      It's magic

      Seriously though, it's probably just memory mapping the index files (via mmap). The OS can automatically share multiple mappings to the same file from different processes, so it allocates RAM for only one copy in memory.

      BTW, threads within one bowtie process automatically share their memory, this only saves memory when running multiple bowtie processes.

      *edit: beaten to it

      Comment

      • mscholz
        Member
        • May 2010
        • 13

        #4
        So,

        I'm back to this. My question is this, how on earth would I call bowtie2 using multiple read sets on the -mm flagged index so that I don't have to keep reloading the same index? Do I have to run it with parallel? I'm just not clear at all on how you get two disparate calls of the same index to share the memory mapping info...

        Thanks!

        Comment

        • arolfe
          Member
          • Jul 2011
          • 29

          #5
          it should just work

          You add the --mm flag to the command line. If there's only one copy of bowtie2 using that index on the machine, there shouldn't be any change. If there are multiple copies of bowtie2 running at the same time and using the same index, the total RAM use will be less as the operating system will only have one copy of the index in memory. You shouldn't notice any difference otherwise.

          Yes, this only helps if you're running multiple instances of bowtie2 at once.

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Nine Things a Sample Prep Scientist Thinks About Before Sequencing
            by SEQadmin2


            I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


            Here are nine questions we think about, in roughly the order they matter, before...
            06-18-2026, 07:11 AM
          • SEQadmin2
            From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
            by SEQadmin2


            Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


            The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
            ...
            06-02-2026, 10:05 AM
          • SEQadmin2
            Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
            by SEQadmin2


            With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


            Introduction

            Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
            05-22-2026, 06:42 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 06-17-2026, 06:09 AM
          0 responses
          21 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-09-2026, 11:58 AM
          0 responses
          38 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-05-2026, 10:09 AM
          0 responses
          45 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 06-04-2026, 08:59 AM
          0 responses
          49 views
          0 reactions
          Last Post SEQadmin2  
          Working...