Git Product home page Git Product logo

Comments (3)

huaicheng avatar huaicheng commented on June 4, 2024 2

It's L. FEMU delay emulation logics already counts in all the software overhead, including I/O emulation + DRAM access. If you set them to a very small value (e.g. less than the software overhead itself), you won't get accurate latency emulation.

from femu.

huaicheng avatar huaicheng commented on June 4, 2024

Yes, you can use the following methods:

(1). In hw/block/femu/femu-oc.c, line 78-83 defines the default latency numbers for page read/program and block erase, profiled from our CNEX OCSSD. You can modify them directly and recompile FEMU.

(2). A more convenient way requires no femu code change. FEMU already defines a NVMe command (opcode: 0xee) for you to change the latency characteristics in flight. In guest OS, you can use the admin-passthru subcommand provided by nvme-cli tool, for example,

$ sudo nvme admin-passthru -d /dev/nvme0n1 --opcode=0xee --cdw10=100000 --cdw11=60000 --cdw12=3000000 --cdw13=1000000 --cdw14=7000000 --cdw15=60000

Where:

  • cdw10=100000; set NAND upper page read latency to 100us
  • cdw11=60000; set NAND lower page read latency to 60us
  • cdw12=3000000; set NAND upper page program latency to 3ms
  • cdw13=1000000; set NAND lower page program latency to 1ms
  • cdw14=7000000; set NAND block erase time to 7ms
  • cdw15=60000; set page channel transfer time to 60us (correspondingly, the channel bandwidth is: 1s / 60us * 16KB = 260MB/s); 16KB is the page size.

You can set all of them to 0 to disable latency emulation when you want to warmup the emulated SSD faster. And restore the latency emulation when running your real workload.

Hope this helps.

from femu.

HongweiQin avatar HongweiQin commented on June 4, 2024

@huaicheng Thanks for your help.
BTW, if I set those values into a pretty low point, should I consider the latency of DRAM?
For example, if I set the read latency to L, is the actual latency L or L+Ldram?

from femu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.